So I need to count how many records start with the same 3 characters.
For this table:
code fullName status
HEL001 John Smith confirmed
HEL002 Paul Adams rejected
HEL004 Ron Swanson confirmed
HEL005 Daniel Silva confirmed
AND001 Johnny English confirmed
AND002 Mary Sweet rejected
AND005 Linda Still confirmed
I need to know the number of records where the code starts with HEL and the
status is confirmed.
I though that sending the query
SELECT LEFT(code, 3) AS 'HEL', COUNT() FROM TABLE_ID WHERE status='confirmed'
would work but it doesn't and I get the following error:
400 Bad Request Invalid query: Parse error near 'SELECT' (line 1,
position 0)
Is there any way to do what I want?
Original issue reported on code.google.com by hasl...@gmail.com on 21 Jun 2015 at 5:44
Original issue reported on code.google.com by
hasl...@gmail.com
on 21 Jun 2015 at 5:44