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 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
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, 23.06.2019 22:30
How many points do i need before i can send a chat
Answers: 1
question
Computers and Technology, 23.06.2019 22:50
An environmental protection agency study of 12 automobiles revealed a correlation of 0.47 between engine size and emissions. at 0.01 significance level, can we conclude that there is a positive association between the variables? what is the p value? interpret.
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, 05.05.2020 17:38
question
Mathematics, 05.05.2020 17:38
Questions on the website: 13722361