help me in writing a Query

  • Hello everyone, in SqlServer 2000 i have a db with following tables::::

    1) Transactions::

    BuyerID

    TransactionTypeID

    TransactionDate

    TotalAmount

    2)TransactionLineItems::

    TransactionLineItemID

    TransactionID

    PinID

    3)Pins::

    PinID

    BatchID

    PinCode

    PinPrice

    4)Batches::

    BatchID

    SupplierID

    TotalPinIssued

    TotalPinProcessed

    5)Supplier::

    SupplierID

    CompanyName

    ContactName

    Mobile

    Email

    6)Buyer::

    BuyerID

    CompanyName

    ContactName

    Mobile

    7)PinPackages::

    PinPackageCode

    PackageName

    PackagePrice

    8)BuyerPinPackages

    BuyerID

    PinPackageCode

    Description

    now i want to write 4 Queries:: (select queries)

    1) i want to get SupplierName,Pin (count),Amount(sum),TransactionDate

    2) i want to get BuyerName,Pin (count),Amount(sum),TransactionDate

    3) i want to get BuyerName,PackageName,Pin (count),Amount(sum),TransactionDate

    4) i want to get SupplierName,PackageName,Pin (count),Amount(sum),TransactionDate

    i want to groupby the records based on the TransactionDate but day wise

    i m new in sqlserver n facing problem in Joins so plz kindly help me asap

    Thanx in Advance.

  • Looks a lot like homework or a quiz... what have you tried?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • No homework and ofcourse no Quiz i want to make a Chart for this i want to take values in differnt styles and order . If u can help me then plz do something .

     

  • No homework and ofcourse no Quiz i want to make a Chart for this i want to take values in differnt styles and order . If u can help me then plz do something .

     

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply