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 / bashi
SELECT sitename, COUNT(*) AS NumOccurrences
FROM tbl_sites
GROUP BY sitename HAVING COUNT(*) > 1
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How do I install mysql workbench?
How to make a column bigger and delete unique from table.
what is mySQL. Is there any specific qualification required to do this course ? What is the scope in India after doing mySQL
In a property booking section want a query to check that property is booked from StartDate to EndDate.Booking Table field are given id proerty_id start_date checkout_date no_of_visitor booking date status Waiting yours answer.. Thanks In Advance...
What is normalization and list the different types of normalization?
Write a query to count the number of rows of a table in mysql.
What is the current root password of mysql?
What is a user defined variable?
Can mysql scale horizontally?
Can a table have multiple primary keys?
What is memory table?
How to Change a users password from MySQL prompt. Login as root. Set the password. Update privs.
What is mysql database used for?
Does mysql support sequence?
Is sql similar to mysql?