Oracle OCI phone interview
Anonymous User
3916

You get a list of logs as input and also start and end date.

log format
name, id, value, day, month, year
"Bob,134,44.0,14,March,2018"
"Mark,134,44.0,15,March,2018"
"Mark,134,22.0,16,March,2018"

each person would have only one log entry per day. There could be several logs per day of several persons.

Given start and end date, how would you return the sum of all the 'value' columns per user between those dates inclusive. The dates could be spanning across months and years.

example start: 03/14/2018 - end: 03/14/2018 - should return only one record which belongs to bob
example start: 03/14/2018 - end: 03/20/2018 - should return only one record for bob with value 44 and one record for Mark but with value 66

Comments (5)