Last active
April 25, 2024 17:54
-
-
Save AlvisonHunterArnuero/aa7d30b6530318238350cff0d41d2649 to your computer and use it in GitHub Desktop.
SQL Query Strings for Test Integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT *, | |
(SELECT brand FROM order_items | |
JOIN products on order_items.product_uid = products.uid AND order_items.order_uid = orders.uid | |
ORDER BY order_items.quantity desc limit 1) AS popular_brand | |
FROM orders | |
SELECT * FROM orders | |
JOIN order_items ON orders.uid = order_items.order_uid | |
JOIN products on products.uid = order_items.product_uid | |
SELECT * FROM orders | |
JOIN order_items on orders.uid = order_items.order_uid | |
ORDER BY order_items.quantity DESC limit 20 | |
SELECT * FROM products | |
WHERE uid = 'MKsGBdK5vp' | |
ORDER BY products.uid | |
SELECT * FROM products limit 15 | |
SELECT * FROM order_items ORDER BY order_uid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment