File: cust_rev.sql

package info (click to toggle)
gnats 3.113-13
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,640 kB
  • ctags: 2,917
  • sloc: ansic: 25,624; tcl: 8,071; sh: 5,362; perl: 3,619; makefile: 3,164; yacc: 820; lisp: 742; sql: 280; sed: 181
file content (28 lines) | stat: -rw-r--r-- 513 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
select customer,
       count(*), avg(age), max(age), min(age)
  from gnats
  where
      gnatsstate < 3
  and gnatsclass < 4
  and severity = 1
  group by customer
  order by customer;

select customer, gnatsid, age
  from gnats
  where
      gnatsstate < 3
  and gnatsclass < 4
  and severity = 1
  order by customer, age;

select customer,
       count(*), avg(age), max(age), min(age)
  from gnats
  where
      gnatsstate < 3
  and gnatsclass < 4
  and severity = 2
  group by customer
  order by customer;