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
How to get nth highest salary from table in a mysql?
why not null is not allowed at table level
How to use regular expression in pattern match conditions?
Why mongodb is faster than mysql?
What are triggers mysql?
How to convert character strings to dates?
Explain the difference between mysql_fetch_array(), mysql_fetch_object()?
Which is better mysql or microsoft sql?
What is unsigned int in mysql?
What is difference between mysql and mariadb?
How do I connect to a mysql database?
How do you restart mysql?
Where’s database data actually stored? Is there a way to see the files which are stored?
How to extract a unit value from a date and time?
What is meant by mysqli?