By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table loginid(login_id int)
insert into loginid
VALUES (2)
create table agent_daily_stats
(dates datetime,
login_id int,
emails_handled int,
chats_handled int)
INSERT into agent_daily_stats (dates,
login_id,emails_handled,chats_handled)
VALUES ('2022-05-01 00:00:00',
(SELECT login_id from loginid),2,2)
select * from agent_daily_stats
dates | login_id | emails_handled | chats_handled |
---|---|---|---|
2022-05-01 00:00:00 | 2 | 2 | 2 |