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...

Table - Products has number of products as below
Productid ProductName
1
iPhone
2
iPad
3
BlackBerry

Table - SalesPersonProduct has the
below records
Salespersonid
productid
S1
1
S1
2
S1
3
S2
1
S3
2

Write a SQL query that returns the number of sales for each
product

Answer Posted / subbareddy.l

Hi,

This query will give us number of sales product wise


select SPP.Productid,COUNT(SPP.Productid)CC from
SalesPersonProduct SPP inner join products P
ON SPP.Productid=P.Productid
group by SPP.Productid

Thanks,
subbareddy.l

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is lock escalation and what is its purpose?

986


What is 4nf in normalization form?

1063


What do you understand by coalesce in sql server?

1129


What is dbcc updateusage?

1258


Explain what stored procedure sp_replcounters is used for? : sql server replication

1577


explain what is raid and what are different types of raid configurations? : Sql server database administration

1056


What is the difference between TRUNCATE and DROP?

1192


What are the advantages of sql stored procedure?

1124


Do you know spatial data types - geometry and geography in sql server 2008?

1092


What is trigger and different types of Triggers?

1201


How to execute stored procedure and set temp table in sql server?

1101


What do you understand by a view? What does the with check option clause for a view do?

1061


What are the instances when triggers are appropriate?

1020


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8204


What do you mean by a Composite primary key?

1192