What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 9422 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > Exclusive Interview Questions > Exclusive SQL Server Interview Questions > .NET and SQL Server interview questions ...

.NET and SQL Server interview questions - Typical complicated SQL Query asked in .NET interview to test your SQL “Group by” Clause syntax capability?

Category: SQL Server | Difficulty Level: Beginners | Views:4329



Answer:

Let us assume that we have the following table of Tourist with their respective rows,columns and data.

Assuming the above table, we have to display the total number of tourists from the different part of the countries.
In order to achieve the required result we have to use SQL “Group by” clause.

Query: -

select T1.TouristCountry,count(T1.TouristName) as NumberOfTourist from Tourist T1 group by T1.TouristCountry

Output: -

Hence you can see that the total number of tourist belongs from different countries has been displayed.

You will be also interested in watching the below video: -


Get Questpond's 500+ .NET Interview preparation videos at discounted price

Found interesting? Add this to:


Page copy protected against web site content infringement by Copyscape
>> Write Response - Respond to this post and get points

More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/23/2013 8:05:36 PM