-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample-queries.txt
More file actions
33 lines (27 loc) · 990 Bytes
/
sample-queries.txt
File metadata and controls
33 lines (27 loc) · 990 Bytes
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
# -- SAMPLE SQL QUERIES --
# -- Sample 1:
SELECT command_id, base_command, sudo_used, user_name, timestamp
FROM Commands
WHERE sudo_used = FALSE AND user_name = "student1030";
# -- Sample 2:
SELECT command_id, raw_command, user_name, risk_level, timestamp
FROM Commands
WHERE sudo_used = TRUE AND risk_level > 2;
# -- Sample 3:
SELECT raw_command, exit_code, timestamp, sudo_used, user_name, risk_level
FROM Commands
WHERE risk_level > 3;
# -- Sample 4:
SELECT *
FROM Commands
WHERE risk_level = 5;
# -- Sample 5:
INSERT INTO Commands VALUES (999999, "echo 'test insert'", "echo", "bash", 0, "2025-12-01T12:00:00.000Z", "FALSE", "/home/test", 1000, "testuser", "test-host", 1);
# -- Sample 7:
SELECT command_id, raw_command, risk_level, exit_code
FROM Commands
WHERE sudo_used = TRUE OR (risk_level = 5 AND shell_type = "bash");
# -- Sample 8:
SELECT user_name, working_directory, base_command
FROM Commands
WHERE user_id = 1001 OR (user_name = "student1002" AND shell_type = "zsh");