6.5 Search for row number that satisfies the condition


We have a statistical table for daily sales of January 2022:


The following code is to find out the date with daily sales greater than 1,000:


pselect@a()means returning the sequence number of all rows that meet the condition, and pselect() means returning only the sequence number of the first row that meets the condition.