×

Loading...

闲来无事, 出道ORACLE SQL的题考考大家. 这是在下几个月前工作中遇到的问题, 看似简单, 其实不然.

Table T has a few columns. Column A in T is not unique. Write a SQL statement returns all the rows in T where column A value is non-unique, and group by A. Please note, you can write a complex SQL statement, but no functions, procedures, and triggers are allowed.

For instance, I have table T:

A B

1 B1
2 B2
3 B3
2 B4
3 B5
3 B6
4 B7

after running the SQL, the result is

A B

2 B2
2 B4
3 B3
3 B5
3 B6
Report