Web lists-archives.com

how to select the record with one sql statement?




helle,
   I have a table, like this:
     pigId      day                weigt
      pig1      2018-1-1        21
      pig2      2018-1-1        31
      pig3      2018-1-1        41
      pig1      2018-1-2        22
      pig2      2018-1-2        31
      pig3      2018-1-2        40
      pig1      2018-1-3        23      pig2      2018-1-3        30
      pig3      2018-1-3        41
      .....

   only the pig1'weight increase continuously for 3 days.   Giving the input: num_of_day(weight increasing continuously for num_of_day);   expecting the output: certain_day, pigId;    from certain_day,  pigId'weight increasing continuously for num_of_day.      How to select the records in one sql statement?
    thanks