Select w.sta_list_id, W.sta_name,w.sta_title from (select b.sta_list_id, a.sta_name,a.sta_title,b.list_file_name from Area as D inner join Stadium_list as a in D.systemid =a.area_id inner join Stadium_list_field as B on A.systemid =b.sta_ list_id INNER JOIN Stadium_spe as C on B.sta_spe_id=c.systemid where d.area_name= ' Hongkou ') as W Group by all w.sta_list_id, W.sta_name,w.sta_title
Check again with the Found W table.
Group by group;
Order by sort
Group BY all grouped together in multiple fields
SELECT * from
A
where num >11
compute max (num), min (num), AVG (NUM)
Compute is to regenerate the results of the comput before using the aggregation function as a table.
The COMPUTE clause must be used with the ORDER BY clause
Compute...by compared with GROUP by,
Group by can only get statistical results for each set of data, not the data
The role of compute and compute by is not very large in real-world development, SQL Server supports compute and compute by, and access does not support
The purpose of the WHERE clause is to remove rows that do not conform to the where condition before grouping the results of the query, that is, filtering the data before grouping, where the cluster function cannot be included, and the Where condition is used to filter out specific rows.
The HAVING clause is used to filter groups that satisfy a condition, that is, to filter the data after grouping, often with clustering functions, to filter out specific groups using the having condition, or to group by using multiple grouping criteria.
Complex SQL statements