Databases SQL Basics Finding the Data You Want Filtering by Dates

Sandeep Padda
Sandeep Padda
2,781 Points

how would i answer this challenge?

I am finding this challenge a bit tricky ive answered this as the following SELECT * FROM results WHERE away_team = "Hessle AND played_on >= 2015-10-01;

what would be the correct way?

2 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 34,905 Points

You are super close - just missing a few quotes

SELECT * FROM results WHERE away_team = "Hessle" AND played_on >= "2015-10-01";
Gabriel Pierce-Lackey
Gabriel Pierce-Lackey
9,268 Points

You didn't close your quotes around Hessel or put the date in quotes. Generally it's good to use single quotes for SQL statements as well.

SELECT * FROM results WHERE away_team = 'Hessle' AND played_on >= '2015-10-01';
Sandeep Padda
Sandeep Padda
2,781 Points

aah thanks! Will definitely keep that in mind.