Ethan Smih
Ethan Smih

Reputation: 133

Not able to get data greater than Date

I tried mulitple types of SQL queries to get the data greater than a date

Select * from Table1
where Date > 2021-07-01
--or where Billing_Date > '2021-07-01'

Billing_Date data type is Date

Both variations not working, getting error:

Syntax Error '>' cannot be applied to date, integer

Using Dbeaver, database- Amazon Athena

Upvotes: 0

Views: 185

Answers (1)

Rushabh Patel
Rushabh Patel

Reputation: 2764

Try this :

Select * from Table1
where Date > DATE('2021-07-01')
--or where Billing_Date > DATE('2021-07-01')

Upvotes: 3

Related Questions