java.sql.SQLSyntaxErrorException: name provided was not in the list of valid column labels:

80 views Asked by At

my query

SELECT COUNT(*) as count FROM datasquare.users WHERE email_id = '"[email protected]"' and 
password = '"krish"' ALLOW FILTERING

my table

 email_id        | password | user_id | user_name
-----------------+----------+---------+-----------
 [email protected] |  krishna |    2915 |     vamsi
1

There are 1 answers

4
MiltoxBeyond On

You can't use count as a label

as count

Use instead total or something along the lines of

as total_users

or similar to avoid using a reserved keyword.