I am having an issue with MAX() on postgres.
With the following data set:
Batch Number
1
2
3
When I query this:
SELECT "Batch Number" FROM tbl WHERE "Batch Number" = (select max("Batch Number") from tbl)
I get the correct value (3)
But when I manually insert a batch number of 10000 and run the same query it still shows 3 as the highest number when it should be 10000
Batch Number
1
2
3
10000