Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2012
    Posts
    1

    Unanswered: Sql statement help

    Hello good day,-

    Please can you help me generate SQL statement in my problem,-

    I have a table named "freights"

    | ID | MODE | DESTINATION | ORIGIN |
    |---|-------|--------------|---------|
    | 1 | SEA | JAPAN-------| CANADA |
    | 2 | AIR | PHILIPPINES | CANADA |
    | 3 | LAND | PHILIPPINES | CANADA |
    | 4 | LAND | PHILIPPINES | CHINA |
    | 5 | LAND | PHILIPPINES | CANADA |
    |---|------|-------------|----------|

    now, i want to display

    DESTINATION ------------| SEA |------| LAND |-----| AIR |
    JAPAN-----------------------1
    PHILIPPINES------------------------------ 2------------1

    why 2?,- becoz i only want to display origins like CANADA not CHINA....

    i know and i believe that there is away to do this in sql.. i think it uses COUNT() but i dont know how.. please???..
    Last edited by sinichi; 11-05-12 at 23:07.

Posting Permissions

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