Querry

  • Hi there all

    Please I need to to have a Query that wourld show how many products are being produced in each country (limit to only countries that produce 5 or more products), from Products and Supplies table , Please

    Thank you

    Best kind regards

  • Hi aferhough,

    Welcome to the forum!

    Could you describe what this query will be used for, is this for a homework assignment?

    It would also be real helpful if you could post a CREATE TABLE script for both the Products and Supplies tables so we don't have to guess your column names. You can get these by right-clicking the tables in SQL Management Studio and selecting Script Table as > CREATE To > New Query Window.

    Regards,
    Andrew

  • aferhouh - Saturday, March 9, 2019 10:16 PM

    Hi there all

    Please I need to to have a Query that wourld show how many products are being produced in each country (limit to only countries that produce 5 or more products), from Products and Supplies table , Please

    Thank you

    Best kind regards

    With the idea of teaching someone to fish, lookup GROUP BY and HAVING for starters.

    --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)

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

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