Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

I need help with this query?

i want to know the query for

Provide a list of products with less than 5 times ordered in all existing sales order in the database.

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    Hi,

    Is your database relational and if so what tables do we need to join and by what Keys?

    SQL structure will be something like:

    SELECT *, COUNT(P.ProductDesc) AS PCNT FROM PRODUCT P INNER JOIN ORDERITEM O ON O.PRODUCTID = P.PRODUCTID WHERE PCNT<5

    *Note you will need to replace tablename and product_name with the correct table name and field names, before this query will work. You have not given enough information to write a working query.

    na

  • 1 decade ago

    SQL.

Still have questions? Get your answers by asking now.