Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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?

Answers were Sorted based on User's Feedback



The table tbl_sites contains the following data: -------------------------------------------------..

Answer / 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

The table tbl_sites contains the following data: -------------------------------------------------..

Answer / bashi

SELECT sitename, COUNT(*) AS NumOccurrences
FROM tbl_sites
GROUP BY sitename HAVING COUNT(*) > 1

Is This Answer Correct ?    0 Yes 1 No

The table tbl_sites contains the following data: -------------------------------------------------..

Answer / sriram

SELECT sitename,COUNT(sitename) FROM tbl_sites GROUP BY
sitename

Is This Answer Correct ?    5 Yes 7 No

The table tbl_sites contains the following data: -------------------------------------------------..

Answer / thilip

SELECT sitename,COUNT(sitename) FROM tbl_sites GROUP BY
sitename

Is This Answer Correct ?    2 Yes 5 No

Post New Answer



More MySQL Interview Questions

What are the mysql database files stored in system ?

0 Answers  


what is the difference between gui testing and database testing? : Mysql dba

0 Answers  


How can you count the total number of records of any table?

0 Answers  


What is the difference between having and where clause in mysql? Explain

0 Answers  


What is datatype in mysql?

0 Answers  






What is the password of mysql?

0 Answers  


Is mysql a programming language?

0 Answers  


How to print message in mysql trigger?

0 Answers  


What are the other commands to know the structure of a table using mysql commands except explain command?

0 Answers  


What is strict mode in mysql?

0 Answers  


What is RMS Migrations

0 Answers   Steria,


What is save point in mysql?

0 Answers  






Categories