Loading ...
Sorry, an error occurred while loading the content.
 

yang canggih querynya tolong donk

Expand Messages
  • Vincent S
    teman2 tolong, misalnya saya punya table kaya gn ID ID2 Nilai ... 1 A 1 1 B 5 1
    Message 1 of 5 , Nov 1, 2006
      teman2 tolong,
      misalnya saya punya table kaya gn


      ID ID2 Nilai
      -------------------------------
      1 A 1
      1 B 5
      1 C 144
      2 B 3
      2 C 1
      3 C 1


      hasil yang diinginkan

      ID ID2min ID2max
      ---------------------------------------
      1 A C
      2 C B
      3 C

      gmn yah querynya?
      makasih sebelumnya



      [Non-text portions of this message have been removed]
    • Ronald Irawan
      select id,id2,min(nilai) from tabelnya group by id,id2 having nilai=1 cmiiw Salam Ronald Irawan Pt. Sanghiang Perkasa Gd. Graha Kirana Lt.5 Jl Yos Sudarso
      Message 2 of 5 , Nov 1, 2006
        select id,id2,min(nilai) from tabelnya
        group by id,id2
        having nilai=1

        cmiiw

        Salam
        Ronald Irawan
        Pt. Sanghiang Perkasa
        Gd. Graha Kirana Lt.5
        Jl Yos Sudarso Kav.88
        Jakarta



        Vincent S <beau_garcion@...>
        Sent by: indoprog-vb@yahoogroups.com
        01/11/2006 03:08 PM
        Please respond to
        indoprog-vb@yahoogroups.com


        To
        indoprog-vb@yahoogroups.com
        cc

        Subject
        [indoprog-vb] yang canggih querynya tolong donk






        teman2 tolong,
        misalnya saya punya table kaya gn


        ID ID2 Nilai
        -------------------------------
        1 A 1
        1 B 5
        1 C 144
        2 B 3
        2 C 1
        3 C 1




        hasil yang diinginkan

        ID ID2min ID2max
        ---------------------------------------
        1 A C
        2 C B
        3 C

        gmn yah querynya?
        makasih sebelumnya



        [Non-text portions of this message have been removed]



        Untuk berhenti berlangganan kirim email kosong ke :
        indoprog-vb-unsubscribe@yahoogroups.com.

        Bagi terjangkit virus lokal, zip virus tersebut
        dan kirim ke hendra.soewarno@..., kami
        akan membuat removalnya untuk anda.
        Yahoo! Groups Links







        [Non-text portions of this message have been removed]
      • Igit Syah Riza
        Mungkin ini bisa buat referensi, SELECT MN.ID AS ID, MN.ID2 AS ID2MIN, MA.ID2 AS ID2MAX FROM (SELECT T.ID, T.ID2 FROM TABLE T, (SELECT ID, MIN(NILAI) AS MN
        Message 3 of 5 , Nov 1, 2006
          Mungkin ini bisa buat referensi,

          SELECT MN.ID AS ID, MN.ID2 AS ID2MIN, MA.ID2 AS ID2MAX FROM"
          (SELECT T.ID, T.ID2 FROM TABLE T,
          (SELECT ID, MIN(NILAI) AS MN FROM TABLE GROUP BY ID) A
          WHERE T.NILAI = A.MN AND T.ID = A.ID) MN,
          (SELECT T.ID, T.ID2 FROM TABLE T,
          (SELECT ID, MAX(NILAI) AS MA FROM TABLE GROUP BY ID) A
          WHERE T.NILAI = A.MA AND T.ID = A.ID) MA
          WHERE MN.ID = MA.ID

          Nanti hasilnya :

          ID ID2min ID2max
          ---------------------------------------
          1 A C
          2 C B
          3 C C

          Karena Data ID 3 cuman satu maka Nilai Min dan Max nya keluar sebagai C.
          Semoga membantu



          ----- Original Message -----
          From: Vincent S
          To: indoprog-vb@yahoogroups.com
          Sent: Wednesday, November 01, 2006 3:08 PM
          Subject: [indoprog-vb] yang canggih querynya tolong donk


          teman2 tolong,
          misalnya saya punya table kaya gn

          ID ID2 Nilai
          -------------------------------
          1 A 1
          1 B 5
          1 C 144
          2 B 3
          2 C 1
          3 C 1

          hasil yang diinginkan

          ID ID2min ID2max
          ---------------------------------------
          1 A C
          2 C B
          3 C

          gmn yah querynya?
          makasih sebelumnya

          [Non-text portions of this message have been removed]





          [Non-text portions of this message have been removed]
        • Igit Syah Riza
          Maaf ada kesalahan dikit, Query sebelumnya.. SELECT MN.ID AS ID, MN.ID2 AS ID2MIN, MA.ID2 AS ID2MAX FROM (SELECT T.ID, T.ID2 FROM TABLE T, (SELECT ID,
          Message 4 of 5 , Nov 1, 2006
            Maaf ada kesalahan dikit,
            Query sebelumnya..

            SELECT MN.ID AS ID, MN.ID2 AS ID2MIN, MA.ID2 AS ID2MAX FROM"
            (SELECT T.ID, T.ID2 FROM TABLE T,
            (SELECT ID, MIN(NILAI) AS MN FROM TABLE GROUP BY ID) A
            WHERE T.NILAI = A.MN AND T.ID = A.ID) MN,
            (SELECT T.ID, T.ID2 FROM TABLE T,
            (SELECT ID, MAX(NILAI) AS MA FROM TABLE GROUP BY ID) A
            WHERE T.NILAI = A.MA AND T.ID = A.ID) MA
            WHERE MN.ID = MA.ID

            Ada Kesalahan tanda " pada ... AS ID2MAX FROM"
            Coba hilangkan tanda " itu..

            Makasih..



            [Non-text portions of this message have been removed]
          • Ian Walker
            Aku mo tanya? ada yang bisa membuat program wumpuss world ga? bagi n share donk!!!! Aku dapet tugas itu, dikumpulin sabtu besok, cepet dibales yah! thx!
            Message 5 of 5 , Nov 1, 2006
              Aku mo tanya?
              ada yang bisa membuat program wumpuss world ga?
              bagi n share donk!!!!

              Aku dapet tugas itu, dikumpulin sabtu besok, cepet dibales
              yah!

              thx!
            Your message has been successfully submitted and would be delivered to recipients shortly.