I have this query:
SELECT `beacons`.*, `blocks`.`ID` AS `blockID` FROM (`beacons`) LEFT JOIN `blocks` ON `blocks`.`StoreID` = `beacons`.`Major` WHERE `beacons`.`Major` = '2' ORDER BY `beacons`.`Minor` desc
When I do it I get reptitive information from the table beacons
What I want to get instead - one row with an array of blocks ID:

Your question (i think) refers to INNER JOIN, which is shown below (amongst others). It also comes with a little bit of SQL for each one :)