Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 is data types in mysql?

0 Answers  


How many primary keys can be there in a table?

0 Answers  


What is new mysqli?

0 Answers  


if we want to load data from a text file into a mysql table, but the columns in table are 1st: code(int) and 2nd: city(varchar), but in text file the format is 1st cityname and then code separeted by delimeters. how to load?

2 Answers  


How to drop an existing table in mysql?

0 Answers  


What is the full meaning of mysql?

0 Answers  


What is csv?

0 Answers  


How is data stored in mysql?

0 Answers  


How do I install mysql workbench?

0 Answers  


What is timestamp in mysql?

0 Answers  


What is the data type for file in mysql?

0 Answers  


How many TRIGGERS are allowed in MySql table?

0 Answers  


Categories