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

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

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is mongodb faster than mysql?

507


What is foreign key in mysql?

599


What are the different data types in mysql?

474


What is a mysql view?

469


What is difference between mysqli and pdo?

478






What is mysqli_result?

509


How to load a csv file into a table

551


How many rows can mysql hold?

471


How to validate email addresses in mysql?

603


What are the purposes of using enum and set data types?

510


If we use sum function in mysql, does it return sum of that row or for that column?

532


What is the function of myisamchk?

566


How do you restart mysql?

487


What are the 3 main types of search queries?

459


Explain the difference between mysql_fetch_array(), mysql_fetch_object()?

464