Skip to content
Advertisement

MySQL-condition on partition size

table1 has 3 columns in my database: id, category, timestamp. I need to query the newest 3 rows from each category:

now I need to add one more condition: select only from the partitions which have at least 3 rows. how to add this condition?

Advertisement

Answer

here is another way:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement