# Database Discussions > Microsoft SQL Server 2005 >  SQL Query Questions

## mattb101

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 tomorrow

Thanks!

1. Whats the count of purchases made on 12th January 2014.

2. Whats the deal title which was purchased on 12th January 2014.

3. Whats the city name and count of deals, where the city name starts with Sydney.

4. Whats the deal_title and gross billings for every deal.


Purchase
purchase_id int 1, 2, 3, 4..
purchase_day string 2014-01-12
person_id int 1, 2, 3, 4
deal_id int 1, 2, 3, 4
coupons int 1, 1, 3, 4
gross_billings double 20.0, 30.0, 40.0
net_billings double 11.5, 17.5, 23.2

Deal
deal_id int 1, 2, 3, 4
deal_title string Dinner for 2, Holiday in Fiji
city_name string Sydney East, Sydney West, Melbourne West, .

Additional information
purchase_id: Is an unique identifier for each purchase transaction
deal_id: Is an unique identifier for each deal
coupons: Number of vouchers purchased
person_id: Is an unique identifier for each customer
purchase_day: Day when the purchase was made
gross_billings: Is the amount charged to our customers credit card.
net_billings: Is living socials share of the purchase revenue
deal_title Name of each deal
city_name: Name of the market where deal is based

----------

