Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 display forums List query

Author  Topic 

esambath
Yak Posting Veteran

89 Posts

Posted - 2008-10-15 : 08:43:11
Hi Friends,

I have four table named as below, and please find the fields also.

From the Category table I have to display the category name and from the request table I have to get the count of request for the particular category. And from the request reply table I have to count the number of request reply, and I want to display who is posted last.

KR_UserManagement

UserId
Name
Password

KR_category

CatId
Name
Description
Parentid

KR_Request

ReqId
CatId
UserId
ReporterId [Reply User id]
Topic
Description
createdDateTime

KR_RequestReply

RepId
ReqId
UserId
Topic
Description

Expected output structure is

[CategoryName] [RequestCount] [RequestReplyCount] [LastPostUser]

Thanks and Regards
E.sambath kumar
   

- Advertisement -