Mode:
Duration:
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
35
36
37
CREATE TABLE users (
user_id SERIAL PRIMARY KEY,
username VARCHAR(50)
);
CREATE TABLE audit_logs (
log_id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(user_id),
action VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO users (username) VALUES
('admin'),
('manager');
INSERT INTO audit_logs (user_id, action) VALUES
(1, 'Created employee record'),
(1, 'Updated salary information'),
(2, 'Generated monthly report');
SELECT
u.username,
a.action,
a.created_at
FROM audit_logs a
JOIN users u
ON a.user_id = u.user_id
ORDER BY a.created_at DESC;
SELECT
u.username,
COUNT(*) AS total_actions
FROM audit_logs a
JOIN users u
ON a.user_id = u.user_id
GROUP BY u.username;Coding works best on desktop or with an external keyboard.
~`
!1
@2
#3
$4
%5
^6
&7
*8
(9
)0
_-
+=
⌫
Tab
Q
W
E
R
T
Y
U
I
O
P
{[
}]
|\
Caps
A
S
D
F
G
H
J
K
L
:;
"'
↵
⇧
Z
X
C
V
B
N
M
<,
>.
?/
⇧
Ctrl
⊞
Alt
␣
Alt
⊞
Ctx
Ctrl
👈Middle
CL Pinky
L Ring
L Middle
L Index
Thumb
R Index
R Middle
R Ring
R Pinky