Results 1 to 2 of 2

Thread: SQL Questions

  1. #1
    Join Date
    May 2014
    Posts
    1

    Lightbulb SQL Questions

    Dears All ,
    Hello

    I have a duty about SQL and i hope you help me.

    There are a tables like the following:

    Tables.png

    Transportation_Transaction
    Transportation_ID
    Source_CityName
    Source_Address
    Destination_CityName
    Destination_Addrtess
    Material
    Amount

    -----------------------------------------
    Involves
    Transportation_ID
    Lic_Driver_Num
    Performance
    Note

    ----------------------------------------------
    Driver
    Lic_Driver_Num
    FullName
    BirthDate

    ================================================== ====================
    1. Ensure that the values of the attribute Note are always between 0 and 10.

    2. For the transportation(s) which transported amount of iron greater than 10000 and with a note below 7, increase their note with ΒΌ of the maximum of the note got by the transportation(s) which transported copper.

    3. For the transportation(s) which transported copper to London with an amount less than 4000, display its number, its source city name, its driver full-name(s) along with his(their) performance(s).

    4. For each driver who participated in transportation(s), list his full name, his license driver number, the number of transportation(s) carried out and his highest note.

    ================================================== ============================

    Can u help me ?

    Kind Regards,

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    1. Use check constraint
    2. Use trigger
    3 / 4 you can write SELECT statements to with give condition as WHERE clause.

Posting Permissions

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