PageRenderTime 22ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/test/src/solidstack/hyperdb/selectUsers.sql.slt

http://solidstack.googlecode.com/
Unknown | 16 lines | 16 code | 0 blank | 0 comment | 0 complexity | 32386e1b73f87d76423baef43c2e6652 MD5 | raw file
Possible License(s): Apache-2.0
 1<%@ template version="1.0" %>
 2SELECT USERNAME, COALESCE( TABLES.COUNT, 0 ) TABLES, COALESCE( VIEWS.COUNT, 0 ) VIEWS
 3FROM ALL_USERS
 4LEFT OUTER JOIN (
 5		SELECT OWNER, COUNT(*) COUNT
 6		FROM ALL_TABLES
 7		GROUP BY OWNER
 8	) TABLES
 9	ON TABLES.OWNER = ALL_USERS.USERNAME
10LEFT OUTER JOIN (
11		SELECT OWNER, COUNT(*) COUNT
12		FROM ALL_VIEWS
13		GROUP BY OWNER
14	) VIEWS
15	ON VIEWS.OWNER = ALL_USERS.USERNAME
16ORDER BY ALL_USERS.USERNAME