if i want to display the name of students such that to
which city they belong must have count greaer than two



if i want to display the name of students such that to which city they belong must have count grea..

Answer / Dhirendra Singh

To achieve this in a database, you can use SQL's HAVING clause. Here's an example using MySQL:

SELECT student_name, city
FROM students
GROUP BY city
HAVING COUNT(student_name) > 2;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Databases AllOther Interview Questions

hai if any one having any project sample table structure please froward to my mail id tauseefwst@yahoo.com

1 Answers   HP,


Explain data independence & its types.

1 Answers  


Explain entity ?

1 Answers  


Which database is best to store images?

1 Answers  


What is ole db ado?

1 Answers  


What are the concurrency problems a database faces?

1 Answers   Amazon,


Explain the record term used in database.

1 Answers  


What are the types of indexes that are present inside a database?

1 Answers   Abacus,


What is database and its types?

1 Answers  


What are different types of data models available? Explain with example?

1 Answers   Accenture,


Given a table Employee which has columns name and salary, write an SQL query to find the employee with the second highest salary.

1 Answers   Amazon,


Explain entity type?

1 Answers  


Categories