Query data from database

From the STATES table of database, query the State name, abbreviation, and population. Then, query the State whose initial is T and the State with the largest population.

Solution:

A
1
=demo.query("select NAME,ABBR,POPULATION from STATES where left(NAME,1)='T'")
2
=demo.query("select NAME,ABBR,POPULATION from STATES where left(NAME,1)=?","T")
3
=demo.query("select NAME,ABBR,POPULATION from STATES where POPULATION = (select max(POPULATION) from STATES)")
4
=demo.query("select NAME,ABBR,POPULATION from STATES")
5
=A4.select(left(NAME,1)=="T")
6
=A4.maxp(POPULATION)

The query result in A1, A2, and A5 is as follows:

The query results in A3 and A6 are the same, as shown below: