Results 1 to 4 of 4

Thread: plz help

  1. #1
    Join Date
    Jan 2004

    Unanswered: plz help

    Considering the following Database Schema:


    PRODUCT(Product_id,Name,Cost_price,Selling_price,Q uantity_on_hand)






    (Please note that the columns in bold form the primary key of that table)

    i have to answer the following queries using SQL.

    1.1 List the name of the city from where the maximum number of customers are operating. Also list the total number of customers for that city.

    1.2 List the names of all those cities which has more vendors operating than the number of customers.

    1.3 List the id and name of all the customers who has done a transaction of more than Rs. 1 lakh on December 31, 2000 through credit.

    1.4 List the details for all customers and the transactions they made from January 1, 1999 till today. The output should contain Customer id, Transaction id, Date_of_Transaction, Amount of Transaction and whether the transaction was done through cash or credit.

    1.5 List the id and name of those vendors who has never supplied any product and reside in the same city which has maximum number of customers.

    plz help
    Rishabh Agarwal

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    sorry, we do not do homework assignments | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2004
    thanks a lot sir
    Rishabh Agarwal

  4. #4
    Join Date
    Jun 2004
    Liverpool, NY USA
    We are not trying to be mean, answering the questions would be easy. But if we answer it, you will not have learned the material and you will have problems in your course down the road. If you can't figure it out, ask your instructor for help. Any teacher worth their salt will be glad to help you out.
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts