I want to select max date from may layer by below query in my Web GIS but I cannot.
(SELECT MAX( GregorianDate ) FROM DrillingProgress WHERE Crew = 'c-Chabock')
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Definition queries are used to get a subset of a layer for visualization purposes. Your query only gets the last date, but not the corresponding record.
So I guess what you want to do is to get the (chronological) last record of a table to visualize it in a layer. If that is right, the definition query would be something like this (you need a nested query to determine the max date, and then you filter your table for records corresponding to that date):
select * from DrillingProgress where GregorianDate = (SELECT MAX( GregorianDate ) FROM DrillingProgress WHERE Crew = 'c-Chabock') and Crew = 'c-Chabock'