Skip to content
Advertisement

Tag: mariadb

How to select one random id from the child table?

I am using 10.4.13-MariaDB. I have a parent table and a child table. Parent table (tasks) In interface it looks like And I have a child table (puzzles) – puzzles table – puzzles can belong only to child themes I want to get ONE random PUZZLE from EACH LEVEL. How to write a proper query? Expected result: My fiddle: https://dbfiddle.uk/?rdbms=mariadb_10.4&fiddle=7bed2a19a0f98abccbe06ba9e0ae358b

Advertisement