You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT:
SELECT [ DISTINCT ]
{ * | projectItem [, projectItem ]* }
FROM tableExpression
[ WHERE booleanExpression ]
[ GROUP BY { groupItem [, groupItem ]* } ]
[ ORDER BY { orderByItem [, OrderByItem ]* }]
[ HAVING booleanExpression ]
[ LIMIT number]
[ OFFSET number]
projectItem:
expression [ [ AS ] columnAlias ]
| tableAlias . *
示例
SELECT * FROM table;
SELECT f1, f2 AS ff FROM table;
SELECT DISTINCT f FROM table;
SELECT * FROM (
SELECT f1, count(*) AS num
FROM t1
GROUP BY f1
) tt
WHERE tt.num > 100;