question

mattb101 avatar image
mattb101 asked

SQL Query Question

Hey guys Was wondering if someone could help me out with the following questions. I haven't got access to SQL Server where I'am and my SQL guy is on holidays. I was wondering if someone could be kind enough to answers the below by writing the code so I can run it Thanks guys!
queryhomework
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@SQLShark avatar image @SQLShark commented ·
Sounds like homework if you ask me! Unfortunately someone has already answered you. There are no short cuts in life. Take the time to learn the basics.
2 Likes 2 ·

1 Answer

·
sunithay avatar image
sunithay answered
1.Whats the count of purchases made on 12th January 2014. select count(*) from Purchase where purchase_day='2014-01-12' 2.Whats the deal title which was purchased on 12th January 2014. select d.deal_title from Deal d inner join Purchase p on d.dealid=p.dealid and p.purchase_day='2014-01-12' 3.Whats the city name and count of deals, where the city name starts with “Sydney”. select count(*) from deals where city_name like 'Sydney%' 4.Whats the deal_title and gross billings for every deal. select d.deal_title,p.grossbillings from Deal d inner join Purchase p on d.dealid=p.dealid
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.