Skip to content

Instantly share code, notes, and snippets.

@FromeXo
Created October 14, 2025 15:19
Show Gist options
  • Select an option

  • Save FromeXo/c327d9677eba0e6548ed79d1ea4177e4 to your computer and use it in GitHub Desktop.

Select an option

Save FromeXo/c327d9677eba0e6548ed79d1ea4177e4 to your computer and use it in GitHub Desktop.
APK
MariaDB [scrape]> SELECT
-> `c`.`name` AS `Category`,
-> `p`.`name`,
-> `p`.`volume`,
-> `p`.`recycle_fee` + `p`.`price` AS `Price`,
-> MAX(`p`.`apk`) AS `APK`
-> FROM
-> `categories` AS `c`
-> LEFT JOIN
-> `products` AS `p`
-> ON
-> `c`.`id` = `p`.`category_id`
-> WHERE
-> `p`.`name` IS NOT NULL
-> GROUP BY
-> `c`.`id`
-> ORDER BY
-> `p`.`apk`
-> ;
+-----------+-----------------------------+--------+--------+------+
| Category | name | volume | Price | APK |
+-----------+-----------------------------+--------+--------+------+
| wine | Norton Barrel Select Malbec | 750 | 119.00 | 2.01 |
| cider_ect | Pistonhead Hard Apple Cider | 330 | 21.00 | 1.52 |
| beer | Pistonhead Regular Lager | 330 | 13.90 | 2.00 |
| liquor | Isle of Skye Peated 8 years | 700 | 243.00 | 1.26 |
+-----------+-----------------------------+--------+--------+------+
4 rows in set (0.017 sec)
@davidcharles52709-byte
Copy link

Interesting code and dataset breakdown here — it’s great to see practical examples that help illustrate SQL queries and data grouping for real product datasets. Seeing how others comment with their take on apps and APKs shows how diverse interests can be around technical snippets like this. In a completely different area of insights, many people also explore tools like a numerology calculator to better understand number patterns related to names and personal traits. Helpful conversation overall!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment