Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Why the query does not execute and rewrite so that it can be executed SQL postgres CREATE TABLE users ( id int, name varchar(1000), join_date
Why the query does not execute and rewrite so that it can be executed SQL postgres CREATE TABLE users ( id int, name varchar(1000), join_date date, PRIMARY KEY (id) ); CREATE TABLE softwares ( name varchar(200), version varchar(100), released_date date, PRIMARY KEY (name) ); CREATE TABLE licenses ( user_id int REFERENCES users (id), software_name varchar(200), access_code varchar(100), PRIMARY KEY (user_id, software_name) );
[4:52 PM]
INSERT INTO users (id, name, join_date) VALUES (48, 'andrew', '2018-01-01'), (49, 'hayden', '2019-01-02'), (50, 'august', '2020-01-02'), (51, 'ayana', '2020-01-01');
[4:53 PM]
INSERT INTO softwares (name, version, released_date) VALUES ('MS Word', '2012', '2011-01-20'), ('Chrome', 'v84', '2018-01-01'), ('Sketch', '49', '2016-06-15');
[4:53 PM]
INSERT INTO licenses (user_id, software_name, access_code) VALUES (48, 'MS Word', 'abc123'), (49, 'MS Word', 'def456'), (50, 'MS Word', 'hij789'), (48, 'Sketch', 'x1y2z3'), (51, 'Sketch', 'x2y3z4');
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started