generated from scottgriv/Dark-Castle-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_queries.sql
34 lines (23 loc) · 1.1 KB
/
example_queries.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/** Dark Castle Theme - MySQL Example Queries **/
-- Select all colors
SELECT * FROM color_palette;
-- Select colors by purpose
SELECT * FROM color_palette WHERE purpose LIKE '%Keyword%';
-- Count the number of colors for each purpose
SELECT purpose, COUNT(*) AS color_count FROM color_palette GROUP BY purpose;
-- Select the current time
SELECT NOW() AS now_time;
-- Select a specific color by name
SELECT * FROM color_palette WHERE name = 'Background';
-- Select colors with RGB values in a specific range
SELECT * FROM color_palette WHERE rgb_r BETWEEN 0 AND 100 AND rgb_g BETWEEN 0 AND 100 AND rgb_b BETWEEN 0 AND 100;
-- Select colors with a specific hue (HSL)
SELECT * FROM color_palette WHERE hsl_h = 0;
-- Select colors used for markdown headings
SELECT * FROM color_palette WHERE purpose LIKE '%Markdown Heading%';
-- Select colors sorted by lightness (HSL)
SELECT * FROM color_palette ORDER BY hsl_l;
-- Select colors with a lightness above a certain threshold (HSL)
SELECT * FROM color_palette WHERE hsl_l > 50;
-- Select colors with a specific saturation (HSL)
SELECT * FROM color_palette WHERE hsl_s = 100;