 |
|
Code (SQL)
select tb1.`ชื่อ`, tb1.`สกุล`, tb1.`เลข`
from (
select `ชื่อ`, `สกุล`,`เลข`, count(*) count_num
from table group by `ชื่อ`, `สกุล`,`เลข`
having count_num>1
) tmp, table tb1
where tmp.`ชื่อ`=tb1.`ชื่อ`
and tmp.`สกุล`=tb1.`สกุล`
and tmp.`เลข`= tb1.`เลข`
order by tb1.`ชื่อ`, tb1.`สกุล`, tb1.`เลข`
|
 |
 |
 |
 |
Date :
2015-05-11 12:08:22 |
By :
Chaidhanan |
|
 |
 |
 |
 |
|
|
 |