Question

In: Computer Science

Create a SQLite Replit that creates a table representing students in a class, including at least...

Create a SQLite Replit that creates a table representing students in a class, including at least name, graduation year, major, and GPA.

Include two queries searching this student data in different ways, for example searching for all students with graduation year of 2021, or all students with GPA above a certain number.

Here is an example you can work from: https://repl.it/@klmec/SQLExample (this is the default example from Replit; you can choose among several other examples when you create a new SQLite Replit).

Solutions

Expert Solution

SQLite Replit that creates a table representing students in a class

.header on

.mode column

/* CREATE command create the table students */

CREATE TABLE students (

name TEXT,

graduation_year INTEGER,

major char,

GPA float

);

/* INSERT command to populate student table with values */

INSERT INTO students VALUES

('Tom', 2001, 'computer', 6.8),

('Haary', 2002, 'Biology', 7.8),

('Denali', 2001, 'computer', 7.0),

('Ram', 2002, 'Networking',8.0),

('Geeta', 2002, 'computer',7.9),

('Sham', 2005, 'Networking',7.0);

/* SQL query to display records of students whose graduation year is 2002 */

.print 'all students with graduation year 2002'

SELECT *

FROM students

where graduation_year='2002'

order by GPA asc;

.print

/* SQl query to display name and GPA of students whose GPA > 7.5 */

.print 'all students with GPA greater tha 7.5'

SELECT name, GPA

from students

where GPA>7.5;

.print

OUTPUT

Please give me a thumbs up if this answer is helpful.


Related Solutions

DROP DATABASE class;CREATE DATABASE class;Use class;drop table if exists Class;drop table if exists Student;CREATE TABLE Class...
DROP DATABASE class;CREATE DATABASE class;Use class;drop table if exists Class;drop table if exists Student;CREATE TABLE Class (CIN int PRIMARY KEY, FirstName varchar(255), LastName varchar(255), Gender varchar(1), EyeColor varchar(50), HairColor varchar(50), HeightInches int,CurrentGrade varchar(1));CREATE TABLE Student (SSN int PRIMARY KEY,FirstName varchar(255),LastName varchar(255), Age int,BirthMonth varchar(255),HeightInches int,Address varchar(255),City varchar(255),PhoneNumber varchar(12),Email varchar(255),FavColor varchar(255),FavNumber int);INSERT INTO Class VALUES(1, "David", "San", "M", "BRN", "BLK", 72, "-");INSERT INTO Class VALUES(2, "Jeff", "Gonzales", "M", "BRN", "BLK", 68, "B");INSERT INTO Class VALUES(3, "Anna", "Grayson", "F", "BRN", "BRN", 62,...
PLEASE ANSWER ONLY IF YOU KNOW subject is Unix System programming Create a SQLite Replit(or SQLite...
PLEASE ANSWER ONLY IF YOU KNOW subject is Unix System programming Create a SQLite Replit(or SQLite on another coding platform) that creates a table representing students in a class, including   name, graduation year, major, and GPA. Include two queries searching this student data in different ways, for example searching for all students with graduation year of 2021, or all students with GPA above a certain number.
Consider the following frequency table representing the distribution of hours students study for an exam in...
Consider the following frequency table representing the distribution of hours students study for an exam in a week. Hours Students Study for an Exam in a Week Class Frequency 17–27 13 28–38 15 39–49 11 50–60 15 61–71 2 Step 1 of 2: Determine the cumulative frequency for the fifth class. Step 2 of 2: Determine the cumulative frequency for the second class.
In Excel, create a 2x30 data table with the left column representing a population of prey...
In Excel, create a 2x30 data table with the left column representing a population of prey and the right column representing a population of predators. Use the population model presented below. Let the starting values of the model parameters be: r = 1.3, k = 1, s = .5, v = 1.6, and u = .7 Let the starting population of P = 1.1 and Q = .4 Difference equations: P[t + 1] = P[t](1 + r(1 – P[t]/K)) -...
Create frequency table (including  include class interval, frequency, relative frequency and cumulative relative frequency. ) and frequency...
Create frequency table (including  include class interval, frequency, relative frequency and cumulative relative frequency. ) and frequency polygon. Please explain HOW for a thumbs up!! TY 05 06 22 23 34 17 17 26 37 25 17 10 30 06 22 33 06 22 10 27 10 37 13 26 19 27 21 31 22 15 14 28 17 13 28 22 34 17 13 10
Create an ADT class that creates a friend contact list. The program should be able to...
Create an ADT class that creates a friend contact list. The program should be able to add, remove and view the contacts. In C++
Calculating the probability that in a class of 20 students, there are at least two with...
Calculating the probability that in a class of 20 students, there are at least two with the same birthday. (a) First, calculate the probability that each student has a different birthday as follows (round to four decimal places) b) Explain briefly why the above probability is calculated that way. (c) Now note that the probability that there are at least two with the same birthday is the complement of the above probability. What is the probability that there are at...
A biology class has 28 students. Find the probability that at least two students in the...
A biology class has 28 students. Find the probability that at least two students in the class have the same birthday. For​ simplicity, assume that there are always 365 days in a year and that birth rates are constant throughout the year.​ (Hint: First, determine the probability that no 2 students have the same birthday and then apply the complementation​ rule.)
First, create a project that creates an ordered linked list class (use the code provided, make...
First, create a project that creates an ordered linked list class (use the code provided, make sure to update the insert function so that it maintains an ordered list). To this class, add a function that prints the list in REVERSE order. Making use of recursion is the easiest and best way to do this, but certainly not the only way. Submit a .zip of your entire project.
Given is a Python program that connects to a sqlite database and has one table called...
Given is a Python program that connects to a sqlite database and has one table called writers with two columnns: name - the name of a writer num - the number of works the writer has written The writers table originally has the following data: name, num Jane Austen,6 Charles Dickens,20 Ernest Hemingway,9 Jack Kerouac,22 F. Scott Fitzgerald,8 Mary Shelley,7 Charlotte Bronte,5 Mark Twain,11 Agatha Christie,73 Ian Flemming,14 J.K. Rowling,14 Stephen King,54 Oscar Wilde,1 Update the Python program to ask...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT