The table tbl_sites contains the following data:
-----------------------------------------------------
Userid sitename country
------------------------------------------------------
1 sureshbabu indian
2 PHPprogrammer andhra
3 PHP.net usa
4 PHPtalk.com germany
5 MySQL.com usa
6 sureshbabu canada
7 PHPbuddy.com pakistan
8. PHPtalk.com austria
9. PHPfreaks.com sourthafrica
10. PHPsupport.net russia
11. sureshbabu australia
12. sureshbabu nepal
13. PHPtalk.com italy
Write a select query that will displayed the duplicated
site name and how many times it is duplicated?

Answer Posted / dinesh goyal, scorpio

select sitename,count(sitename) as total_sites from
tbl_sites group by sitename having (count(sitename)>1)

Is This Answer Correct ?    22 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we write pl sql mysql?

508


How can I create database in mysql?

508


What are procedures in mysql? Explain

535


What is limit in mysql?

452


What is prepare statement in mysql?

515






What is new mysqli?

494


Is foreign key indexed mysql?

476


How can we get total number of records by query in mysql?

501


What are the technical features of MySQL?

585


Is mysql a server?

475


What is the latest mysql version?

479


How does select query work?

499


In mysql, what is joins? Explain

541


How to check if a record exists in a mysql database php?

451


How do I edit a table in mysql workbench?

447