How to perform for this Sql Server Query

Posted by Jayakumars under C# on 6/2/2017 | Points: 10 | Views : 497 | Status : [Member] [MVP] | Replies : 0
In advertisement company , how many people apply particular advertisement type particular state how will perform for this query

I need output this

Advertisment State Applymember
Hindu Paper Tamilnadu count here
Walkin Kerela
News Andhra
Friends Karnataka

here how many members in tamilnadu for
advertisement hindu paper,walkin, news ,friends individual count in every state
separately count i mention below query

create table advlist
aid int primary key identity(1,1),
aname nvarchar(100)

insert into advlist values ('Hindu'),('Walkin'),('News'),('Friends')

create table advstate
stid int primary key identity(1,1),
stname nvarchar(100)

insert into advstate values ('Tamilnadu'),('Kerela'),('Andhra'),('Karnataka')

create table advapply
apid int primary key identity(1,1),
apname nvarchar(100),
apmemberid int,
aid int
insert into advapply values ('John-A',1,1),('Rufals-A',2,1),('Watson-A',1,2),('morries-A',1,3)

create table advpersonal
apeid int primary key identity(1,1),
apemember nvarchar(50),
stid int

insert into advpersonal values ('John',1),('Rufals',2),('Watson',1),('morries',1)

Mark as Answer if its helpful to you


(No response found.)

Login to post response