User Tools

Site Tools


oracle:sql:count

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
oracle:sql:count [2021/08/08 18:07] peteroracle:sql:count [2021/08/08 18:07] (current) peter
Line 5: Line 5:
 [[Oracle:SQL:Count:Count Distinct|Count Distinct]] [[Oracle:SQL:Count:Count Distinct|Count Distinct]]
  
- 
-A query can be wrapped in another SELECT: 
- 
-<code sql> 
-select count(*) 
-from 
-( 
-select count(SID) tot  -- add alias 
-from Test  
-where Date = '2012-12-10'  
-group by SID 
- 
- 
-select count(*) 
-from 
-(Select COLUMNS  
- from SCHEMA.TABLE  
- where nvl(TRADING_BRANCH||TRADING_ACCOUNT, 'ZZZZ') = 'ZZZZ' and LEGACY_PARTNER_TYPE in ('DELIVERY', 'MND')) 
- 
- 
-select column_name, count(column_name)  
-from table 
-group by column_name 
-having count (column_name) > 1;  
-</code> 
  
oracle/sql/count.1628446026.txt.gz · Last modified: 2021/08/08 18:07 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki