Post a New Question

SQL for business help

posted by .

I have no idea where to begin with this. A SQL statement that creates a user defined function that returns an int value is needed. This int return value is obtained by deducting the lowest Count field value from the highest Count field value of the Part table. You should enter sample test records in the Part table if you are running/testing this function in SQL Server.

  • SQL for business help -

    Try the max() and min() functions.

    Depending on the flavour of the SQL you're using, you could do something like:

    SELECT MAX(PartCount)-MIN(PartCount) AS CountRange FROM PartsTable;

    If you need a "function" and not a select statement, it depends on the SQL you're using (e.g. PL/SQL for Oracle)

    Need more help on syntax and examples? Try the W3Schools tutorials.

Answer This Question

First Name:
School Subject:

Related Questions

More Related Questions

Post a New Question