5 Replies Latest reply: Jun 23, 2017 3:29 AM by P M RSS

    Quantity work conditions in SQL query

    Андрей Шепель

      Good day!

      I have simple table:

       

         

       

      Field1Field2Field3Field4
      1201254
      23744432
      435556445
      12435435344
      122244435

      My task is to write SQL select query, which must get me rows, for which quantity of worked conditions=2

       

       

       

      and only those records, for which quantity of worked below conditions=2:

       

      1. Field1>Field2

      2. Field3=444

      3. Field4>32

       

      In result i need get only first 2 records:

       

      Field1Field2Field3Field4
      1201254
      23744432

       

      Thanks.