oracle:sql:count
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
oracle:sql:count [2021/08/08 18:07] – peter | oracle:sql:count [2021/08/08 18:07] (current) – peter | ||
---|---|---|---|
Line 5: | Line 5: | ||
[[Oracle: | [[Oracle: | ||
- | |||
- | A query can be wrapped in another SELECT: | ||
- | |||
- | <code sql> | ||
- | select count(*) | ||
- | from | ||
- | ( | ||
- | select count(SID) tot -- add alias | ||
- | from Test | ||
- | where Date = ' | ||
- | group by SID | ||
- | ) | ||
- | |||
- | select count(*) | ||
- | from | ||
- | (Select COLUMNS | ||
- | from SCHEMA.TABLE | ||
- | where nvl(TRADING_BRANCH||TRADING_ACCOUNT, | ||
- | |||
- | |||
- | select column_name, | ||
- | from table | ||
- | group by column_name | ||
- | having count (column_name) > 1; | ||
- | </ | ||
oracle/sql/count.1628446026.txt.gz · Last modified: 2021/08/08 18:07 by peter