By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
| id | firstname | lastname | time |
|---|---|---|---|
| 1 | albert | einstein | today |
| 2 | isaac | newton | today |
| 3 | marie | curie | today |
| 4 | Aneesh | pn | yesterday |
| 5 | joe | curie | yesterday |
| 6 | Aneesh | hahha | yesterday |
| 7 | Aneesh | narayanan | today |
SELECT 7
| id | firstname | lastname | time |
|---|---|---|---|
| 1 | albert | einstein | today |
| 2 | isaac | newton | today |
| 3 | marie | curie | today |
| 4 | Aneesh | pn | yesterday |
| 5 | joe | curie | yesterday |
| 6 | Aneesh | hahha | yesterday |
| 7 | Aneesh | narayanan | today |
SELECT 7
| id | firstname | lastname | time |
|---|---|---|---|
| 4 | Aneesh | pn | yesterday |
| 5 | joe | curie | yesterday |
| 6 | Aneesh | hahha | yesterday |
| 7 | Aneesh | narayanan | today |
SELECT 4