Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010

    Unanswered: Find out Product Sold

    Hi all,
    I have a query regarding a table structure.We are using single SQL SERVER 2008 Database for two online selling websites.i.e.,The products which the two websites uses are same,but the description about the products are different.For example,we will sell a "Toy" of same price and model on both websites but with different description.At present I used two different id for websites say,Id "1" for Website 1 and Id as "2" for website 2.And also populated the Product table with diiferent Id's for same product along with the description and website id.
    Now the problem is I need to find out how many "Toy" has been sold out in both websites together.
    Can any one help me out?Should I introduce a separate table structure to relate the Productid?

  2. #2
    Join Date
    Apr 2008
    Iasi, Romania
    Provided Answers: 3
    SELECT SUM(Sales.Value)
    FROM Sales s, Product p
    WHERE s.product_id = p.product_id
    AND p.product_name = 'Toy'
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

Tags for this Thread

Posting Permissions

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