|
SQL> with t as (select level n from dual connect by level <= 100),
2 s as (select a.n
3 from t a,t b
4 where a.n >= 2*b.n
5 and mod(a.n,b.n) = 0
6 group by a.n
7 having sum(b.n) > a.n)
8 select * from s
9 order by 1;
N
----------
12
18
20
24
30
36
40
42
48
54
56
N
----------
60
66
70
72
78
80
84
88
90
96
100
22 rows selected.
从1 开始至少12? |
|