Sql queries Filter's adjacent duplicate data

the data in the table is sorted according to the sorted col. When querying, repeat the data in some fields of Filter [adjacent],
and save the value of the lowest sorted col (originally saved is time, the principle should be the same
such as:

create table tb (
    eat int,
    drink int,
    col int;
)
insert into tb(eat ,drink ,col) values(1,1,1);
insert into tb(eat ,drink ,col) values(1,1,2);
insert into tb(eat ,drink ,col) values(2,3,3);
insert into tb(eat ,drink ,col) values(2,3,4);
insert into tb(eat ,drink ,col) values(1,1,5);
insert into tb(eat ,drink ,col) values(1,1,6);
insert into tb(eat ,drink ,col) values(4,5,7);
insert into tb(eat ,drink ,col) values(5,6,8);
insert into tb(eat ,drink ,col) values(2,3,9);

query Filter"s adjacent and identical ear,drink data, and keep the coll value
corresponding to the data jump. The result of the query should be as follows
1, br > 2, 3, br, 1, 5, br, 4, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 8, 5, 8, 2, 3, br, 9, br, call for help.

Oct.16,2021

use group by to group, and take the minimum value, for example:

select eat, drink, min(col)
from tb
group by eat, drink

because it is an adjacent one, so the order will affect the final result. I added an ID field to ensure that the results are consistent

SELECT eat, drink, col
  FROM (SELECT *, row_number() OVER(PARTITION BY eat, drink ORDER BY col ASC) AS n from order_items)  t 
 WHERE n = 1
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e42b-2c3e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e42b-2c3e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?