runtime
08 / 139

task BETWEEN & ranges · warm-up

Orders from 15 December 2010

Find every order placed from 15 December 2010 through the end of that month. Return order_id, invoice_no and ordered_at. Include every time on 31 December.

what to return

Columns
order_idinvoice_noordered_at in this order
Rows
72 rows · any order
Skill
Filter a date span without dropping the last day. Refresher: Comparisons & ranges →

expected result

expected result72 rows · any order
order_idinvoice_noordered_at
36065388962010-12-15 09:09:00
36075388992010-12-15 09:49:00
36085389422010-12-15 11:14:00

first 3 of 72 rows

data you can query

orders6 columns · 6,722 rows
order_idnumber · unique idinvoice_notextcustomer_idnumber · links to customersordered_atdate & timecountrytextorder_typetext
1489438181022009-12-01 09:24:00United Kingdomsale
2489517163292009-12-01 11:34:00United Kingdomsale
3C489528167142009-12-01 11:50:00United Kingdomcancellation
4489529179842009-12-01 11:51:00United Kingdomsale
5489532133942009-12-01 11:58:00United Kingdomsale
6489540129132009-12-01 12:18:00United Kingdomsale
7C489541150912009-12-01 12:18:00United Kingdomcancellation
8C489549137682009-12-01 12:33:00United Kingdomcancellation
9C489555169552009-12-01 12:44:00United Kingdomcancellation
10489559170562009-12-01 12:55:00United Kingdomsale
order_idnumber · unique id
1
invoice_notext
489438
customer_idnumber · links to customers
18102
ordered_atdate & time
2009-12-01 09:24:00
countrytext
United Kingdom
order_typetext
sale
order_idnumber · unique id
2
invoice_notext
489517
customer_idnumber · links to customers
16329
ordered_atdate & time
2009-12-01 11:34:00
countrytext
United Kingdom
order_typetext
sale
order_idnumber · unique id
3
invoice_notext
C489528
customer_idnumber · links to customers
16714
ordered_atdate & time
2009-12-01 11:50:00
countrytext
United Kingdom
order_typetext
cancellation
order_idnumber · unique id
4
invoice_notext
489529
customer_idnumber · links to customers
17984
ordered_atdate & time
2009-12-01 11:51:00
countrytext
United Kingdom
order_typetext
sale
order_idnumber · unique id
5
invoice_notext
489532
customer_idnumber · links to customers
13394
ordered_atdate & time
2009-12-01 11:58:00
countrytext
United Kingdom
order_typetext
sale
order_idnumber · unique id
6
invoice_notext
489540
customer_idnumber · links to customers
12913
ordered_atdate & time
2009-12-01 12:18:00
countrytext
United Kingdom
order_typetext
sale
order_idnumber · unique id
7
invoice_notext
C489541
customer_idnumber · links to customers
15091
ordered_atdate & time
2009-12-01 12:18:00
countrytext
United Kingdom
order_typetext
cancellation
order_idnumber · unique id
8
invoice_notext
C489549
customer_idnumber · links to customers
13768
ordered_atdate & time
2009-12-01 12:33:00
countrytext
United Kingdom
order_typetext
cancellation
order_idnumber · unique id
9
invoice_notext
C489555
customer_idnumber · links to customers
16955
ordered_atdate & time
2009-12-01 12:44:00
countrytext
United Kingdom
order_typetext
cancellation
order_idnumber · unique id
10
invoice_notext
489559
customer_idnumber · links to customers
17056
ordered_atdate & time
2009-12-01 12:55:00
countrytext
United Kingdom
order_typetext
sale

first 10 of 6,722 rows · your queries use all of them

solution.sql
 
Output

Hints and the answer are always available. Using them counts the question as solved with help.

Orders from 15 December 2010 — SQL practice · Runtime