Must use (https://replit.com/) tool -SQLite and here is my space for that you can check for reference: https://replit.co

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Must use (https://replit.com/) tool -SQLite and here is my space for that you can check for reference: https://replit.co

Post by answerhappygod »

Must use (https://replit.com/) tool -SQLite
and here is my space for that you can check for reference:
https://replit.com/join/sxbhauufiz-s200050194
Hello there,
I've SQL question, after I've created a table and insert its values
with the following statements
create table students (
id integer,
name varchar (20),
gender varchar (6),
college varchar (50),
grade int NOT NULL
phone_No number(10) NOT NULL ,
primary key (id),
UNIQUE (phone_No)
);
insert into students values
(1, 'Ahmed', 'male', 'Computer Science',10, 1234567890),
(2, 'Muhammad', 'male', 'Science',12, 2345678901),
(3,'Maha', 'female', 'Engineering', 10,3456789012),
(4, 'Reem', 'female', 'Nursing', 11, 4567890123),
(5, 'Khalid', 'male', 'Engineering', 12,5678901234),
(6, 'Badr', 'male', 'Science', 10,6789012345),
(7, 'Sarah', 'female', 'Nursing', 12, 7890123456);
and I were asked to run these:
c. SELECT DISTINCT gender FROM students
; // Now, it will return two rows
d. select grade from students. //it will sow only
the grades from the students table
e.
SELECT grade+ 3 AS FROM students;
// it will add 3 marks to all the students
f.
SELECT grade+ 3 AS updatedgrade FROM students
AS stu; // this will create a new table as name it as
updated_students_grade.
I've answerd all of them except Q.f ,I struggled with it.
Must Use Https Replit Com Tool Sqlite And Here Is My Space For That You Can Check For Reference Https Replit Co 1
Must Use Https Replit Com Tool Sqlite And Here Is My Space For That You Can Check For Reference Https Replit Co 1 (139.11 KiB) Viewed 35 times
as you can see, it shows me Error: near line 92: no such table:
updated_students_grade
while my instructor says it will create a new
table as name it as updated_students_grade.
So I'm confused and asking for your kind help guys
:)
Thank you...
الخدمات الإلكترونية - .. D. Staffit My timesheets -- Fi... Oxford Learner's Bo... الجامعة السعودية الإلكترونية >> / Practice Day1 2+ Invite 0 main.sql x Console Shell Loading resources from main.sql 13 15 13 14 15 13 15 students. //it will sow only the grades from the students table*/ 81 82 /*Qustion.e/: 83 SELECT grade+ 3 FROM students; // it will add 3 marks to all the students, note if it was: 84 SELECT grade- 3 FROM students; it wil subtract 3 marks from all students*/ 85 86 87 SELECT grade+ 3 AS updatedgrade FROM students AS stu; 88 89 select (" "); 90 select grade from students; 91 select (" "); 92 select grade from updated_students_grade; 10 12 10 11 12 10 12 4 Error: near line 92: no such table: updated_st udents_grade SQLite version 3.35.5 2021-04-19 18:32:05 Enter ".help" for usage hints.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply