File: cust_rev.sql

package info (click to toggle)
gnats 4.1.0-3
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 5,912 kB
  • sloc: ansic: 22,478; sh: 9,854; tcl: 8,156; lisp: 2,254; perl: 1,740; yacc: 1,632; makefile: 1,207; lex: 449; sql: 280; sed: 22
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;