Hello,
I have this kind of table called dbtable
|CITY| |VALUE| |TEXT|
CA 1 caaa
CA 2 cbbb
CA 3 cccc
NY 1 naaa
NY 2 nbbb
NY 3 nccc
NY 4 nddd
BO 1 baaa
BO 2 bbbb
BO 3 bccc
BO 5 bddd
BO 5 beee
I'm trying to get maximum value of city NY with the following select sentence, but its not working. There's no error but it's selecting the max value from all of the values, like it's not using "and city = 'NY' at all
SELECT city, value, text FROM table WHERE value = (SELECT MAX(value)FROM dbtable) and city = 'NY'