subject

There was a robbery from the ATM at the bank where you work. Some unauthorized withdrawals were made, and you need to help your bank find out more about those withdrawals. But the only information you have is that there were more than 1 withdrawals and that all of them were done in 10-second gaps. You have a table customer_transactions with the following columns:
id - the unique transaction ID;
customer_name - the name of the customer of the bank;
transaction_time - the date and time when this transaction was made;
transaction_amount - the amount of money involved in this transaction.
You need to retrieve all the customer_names whose any two consecutive transactions have a 10-second gap from each other. It is guaranteed that no two people have the same name, so equal customer_names correspond to the same person.
Example
For given table customer_transactions
idcustomer_nametransaction_timetran saction_amount
1Lillian Nelson2017-01-01 10:10:1510
2Susan Moore2017-01-01 11:11:1120
3Kian Lawrence2017-01-01 12:12:1210
4Lillian Nelson2017-01-01 10:10:2030
5Lillian Nelson2017-01-01 10:10:3040
6Susan Moore2017-01-01 11:11:2150
the output should be
customer_name
Susan Moore
Explanation of the example:
Let's consider all customers:
Lillian Nelson did three transactions at 2017-01-01 10:10:15, 2017-01-01 10:10:20, and 2017-01-01 10:10:30, so the gaps between her transactions are 5 and 10 seconds respectively. Since not all the gaps are 10 seconds long, she cannot be a robber.
Susan Moore did two transactions at 2017-01-01 11:11:11 and 2017-01-01 11:11:21, so the gap between her transactions is 10 seconds. Since all the gaps are 10 seconds long, she possibly can be a robber.
Kian Lawrence did only one transaction, so he cannot be a robber.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
question
Computers and Technology, 24.06.2019 07:00
Jean has kept the content of her website limited to what is important; she has also ensured that the text follows a particular style and color all throughout her website. which website features has jean kept in mind? jean has limited the content of her website to what is important; this ensures (clarity, simplicity, harmony and unity) of the content. she has also formatted the text in a particular style and color throughout her website, ensuring (balance, simplicity, consistency)
Answers: 2
You know the right answer?
There was a robbery from the ATM at the bank where you work. Some unauthorized withdrawals were made...
Questions
question
Mathematics, 08.10.2019 01:30
question
Biology, 08.10.2019 01:30
Questions on the website: 13722359