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

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

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between mysql_connect and mysql_pconnect?

557


What is the purpose of using timestamp data type?

504


What is the usage of "i-am-a-dummy" flag in mysql?

677


Why do we use mysql?

489


What is the difference between unix timestamps and mysql timestamps?

514






Is mysql and sql are same?

520


What do we use to remove duplicate records while fetching a data in mysql ?

521


How to Set a root password if there is on root password.

590


Which is better sqlite or mysql?

500


Is mysql a nosql database?

511


What is the function of myisamchk?

566


Is mysql a programming language?

453


How to check if value already exists in mysql database in php?

448


Write a query to retrieve a hundred books starting from 20th.

967


How can you retrieve a portion of any column value by using a select query?

450