Because HQL is object-oriented, so the use of HQL in statistical data is inappropriate, in fact HQL will eventually be converted into SQL statements, the project uses HQL statements should be standardized.
Statistical data: The same table, the same field, different attributes, the number of records of different attributes;
For example: There is a room table,:
Now all I have to do is to count the number of available rooms for each room.
But this is different for HQL statements, so in the DAOIMP layer, query SQL is used
also : Note that the property cannot be called directly for list, for example (#list. Name, #list. Password)
For the use of iterator, the number of rows is automatically traversed, so when using S:property, the number of columns of the array list can be used directly.
For the use of S:set
You need to specify the rows and columns of the array list
Statistical aspects of SQL and HQL