Interview Query

Sample Time Series

Start Timer

0:00:00

Upvote
11
Downvote
Save question
Mark as completed
View comments (25)
Next question

Given a transactions table with date timestamps, sample every 4th row ordered by the date.

Example:

Input:

transactions table

Columns Type
id INTEGER
user_id INTEGER
created_at DATETIME
product_id INTEGER
quantity INTEGER

Output:

Columns Type
created_at DATETIME
product_id INTEGER
.
.
.
.
.


Comments

Loading comments.