Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions x-pack/plugin/sql/qa/server/src/main/resources/date.csv-spec
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ SELECT TRUNCATE(YEAR(TODAY() - INTERVAL 50 YEARS) / 1000) AS result;


currentDateFilter
SELECT first_name FROM test_emp WHERE hire_date > CURRENT_DATE() - INTERVAL 45 YEARS ORDER BY first_name ASC LIMIT 10;
SELECT first_name FROM test_emp WHERE hire_date > DATE_TRUNC('CENTURY', CURRENT_DATE()) - INTERVAL 11 YEARS ORDER BY first_name ASC LIMIT 10;

first_name
-----------------
Alejandro
Amabile
Anneke
Anoosh
Arumugam
Basil
Berhard
Berni
Bezalel
Bojan
Brendon
Cristinel
Divier
Domenick
;

currentDateFilterScript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3345,15 +3345,15 @@ SELECT TODAY() AS result;

filterToday
// tag::filterToday
SELECT first_name FROM emp WHERE hire_date > TODAY() - INTERVAL 35 YEARS ORDER BY first_name ASC LIMIT 5;
SELECT first_name FROM emp WHERE hire_date > DATE_TRUNC('CENTURY', TODAY()) - INTERVAL 11 YEARS ORDER BY first_name ASC LIMIT 5;

first_name
------------
Alejandro
Amabile
Anneke
Anoosh
Basil
Cristinel
// end::filterToday
;

Expand Down