0 Replies Latest reply on May 22, 2019 2:26 PM by 97781a82-f4ca-4734-9f68-c2b7bc950b20

    duplicated in group

    97781a82-f4ca-4734-9f68-c2b7bc950b20

      If I have 1 table with 2 field: sector and numbers, e.g.

       

      sector - numbers

       

      medicine 34

      medicine 20

      medicine 34

      medicine 34

      medicine 34

      medicine 5

      informatics 3

      informatics 3

      informatics 3

      informatics 5

      other 2

      other 3

      other 3

       

      How can I obtain by sql query the first max value for every sector, my query should have to get:

      medicine 34,

      informatics 3,

      other 3

       

      for Every sector group I have to choose the max number (THE FIRST record with max value), suggestions please?