Revision 47579 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/test/resources/org/gvsig/sqlite/dal/count.sql

View differences:

count.sql
6 6
-- trim-end true
7 7

  
8 8
-- begin count
9
SELECT COUNT(*) FROM "PUBLIC"."test"
9
SELECT COUNT(*) FROM "test"
10 10
-- end count
11 11

  
12 12
-- begin testAggregatesAndGroup
13 13
-- rem Count with aggregates and group SQL
14 14
SELECT COUNT(*) 
15
FROM ( SELECT MAX("PUBLIC"."test"."Byte") AS "Byte", 
16
             MIN("PUBLIC"."test"."ID") AS "ID", 
17
             SUM("PUBLIC"."test"."Double") AS "Double" 
18
      FROM "PUBLIC"."test" 
19
      GROUP BY "PUBLIC"."test"."Long") AS _subquery_alias_ 
15
FROM ( SELECT MAX("test"."Byte") AS "Byte", 
16
             MIN("test"."ID") AS "ID", 
17
             SUM("test"."Double") AS "Double" 
18
      FROM "test" 
19
      GROUP BY "test"."Long") AS _subquery_alias_ 
20 20
-- end testAggregatesAndGroup
21 21

  
22 22
-- begin testGroup
23 23
-- rem Count with group SQL
24 24
SELECT COUNT(*) 
25
FROM ( SELECT "PUBLIC"."test"."Long" 
26
      FROM "PUBLIC"."test" 
27
      GROUP BY "PUBLIC"."test"."Long") AS _subquery_alias_ 
25
FROM ( SELECT "test"."Long" 
26
      FROM "test" 
27
      GROUP BY "test"."Long") AS _subquery_alias_ 
28 28
-- end testGroup
29 29

  
30 30
-- begin testAggregates
31 31
-- rem Count with aggregates
32 32
SELECT COUNT(*) 
33
FROM ( SELECT MAX("PUBLIC"."test"."Byte") AS "Byte", 
34
             MIN("PUBLIC"."test"."ID") AS "ID", 
35
             SUM("PUBLIC"."test"."Double") AS "Double" 
36
      FROM "PUBLIC"."test") AS _subquery_alias_ 
33
FROM ( SELECT MAX("test"."Byte") AS "Byte", 
34
             MIN("test"."ID") AS "ID", 
35
             SUM("test"."Double") AS "Double" 
36
      FROM "test") AS _subquery_alias_ 
37 37
-- end testAggregates
38 38

  

Also available in: Unified diff