Question

In: Computer Science

In MySql, using Application MYSQL Workbench and the Chinook database, please answer the following: -- 12....

In MySql, using Application MYSQL Workbench and the Chinook database, please answer the following: -- 12. SELECT the trackid, name and filesize (as shown in the bytes column) for all tracks that have a file size less than 2000000 and a GenreId of 1 or a file size less than 2000000 and a Genreid of 2 -- 13. Add a sort to the query from number 12 to sort by GenreID; -- 14. List all columns from the customer table where the customer Country is Brazil, Argentina, or Chile

Solutions

Expert Solution

Q12.

Query:

Select trackid, name, bytes as filesize
from track
where bytes < 2000000 and GenreId in (1,2)

Output:

Q13.

Select trackid, name, bytes as filesize
from track
where bytes < 2000000 and GenreId in (1,2)
Order by GenreId;

Output:

Q14.

Query:

Select *
from customer
where country in ("Brazil", "Argentina", "Chile")

Output:

(*Please up-vote. If any doubt, please let me know in the comments)


Related Solutions

Design and implement a relational database application of your choice using MS Workbench on MySQL a)...
Design and implement a relational database application of your choice using MS Workbench on MySQL a) Declare two relations (tables) using the SQL DDL. To each relation name, add the last 4 digits of your Student-ID. Each relation (table) should have at least 4 attributes. Insert data to both relations (tables); (15%) b) Based on your expected use of the database, choose some of the attributes of each relation as your primary keys (indexes). To each Primary Key name, add...
This refer to the “om” database (or Schema) that you will find in your MySQL Workbench...
This refer to the “om” database (or Schema) that you will find in your MySQL Workbench program if you have run the sample database install script. Please save all of your answers in one script (.sql) or type all your answers into Notepad++ and submit them as a single .sql file. Please test your SQL statements in Workbench 1.       Using an INNER JOIN, select the order_id, order_date, shipped_date, fname, and customer_phone from the orders and customers tables. The fname is a...
Part 2: Use MySQL Workbench to add a table to your database on the class server...
Part 2: Use MySQL Workbench to add a table to your database on the class server and name the table “Person”. Include these fields in the Person table: Field Name Description Data Type Sample Value LoginID User’s login name varchar(10) Bob FirstName User’s first name varchar(50) Bob LastName User’s last name varchar(50) Barker picUrl Filename of the user’s picture varchar(50) bob.gif Bio User’s biography varchar(255) Bob is the best! LoginID should be the Primary Key of the table. Add at...
Using WORKBENCH: 1. Create the database below via an ER Diagram in Workbench (take screen shots...
Using WORKBENCH: 1. Create the database below via an ER Diagram in Workbench (take screen shots of the diagram) 2. Go to the database table view and take a screen shot of the table(s) 3. Go to the data entry tool and enter at least three lines of data (in each table). Take screen shots. Create a database that is in third normal form for the following: You are a nerd and have decided to organize your comic books in...
Using the sample.sql script, create the sample database in MySQL. Submit the MySQL interactive screen that...
Using the sample.sql script, create the sample database in MySQL. Submit the MySQL interactive screen that results. create database sample; use sample; create table customer (custno int auto_increment primary key, firstname varchar(20), middle varchar(20), lastname varchar(20), address varchar(60), telnum1 varchar(10), telnum2 varchar(10), telnum3 varchar(10), pin varchar(6), email varchar(30)); create table accttype (id int primary key, type varchar(10)); insert into accttype (id, type) values (1,'check'); insert into accttype (id, type) values (2,'save'); insert into accttype (id, type) values (3,'cd'); insert into...
Develop a C++/Python program using visual studio connected to mysql workbench to show all vendor's name...
Develop a C++/Python program using visual studio connected to mysql workbench to show all vendor's name and phone (vendor_name and vendor_phone) in the state "CA" and the city "Los Angeles". here is the database tables CREATE TABLE general_ledger_accounts ( account_number INT PRIMARY KEY, account_description VARCHAR(50) UNIQUE ); CREATE TABLE terms ( terms_id INT PRIMARY KEY AUTO_INCREMENT, terms_description VARCHAR(50) NOT NULL, terms_due_days INT NOT NULL ); CREATE TABLE vendors ( vendor_id INT PRIMARY KEY AUTO_INCREMENT, vendor_name VARCHAR(50) NOT NULL UNIQUE, vendor_address1...
Using MySQL 8.xx create a database with the following characteristics. . A. Your design MUST meet...
Using MySQL 8.xx create a database with the following characteristics. . A. Your design MUST meet the requirements for Third Normal Form B. Create a database (you will need multiple tables) to store employee information. This information will include: Employee Number, First Name, Last Name, Date of birth, Address, city, state, zip, department, job title, supervisor, health insurance number, health insurance provider, dental insurance number, dental insurance provider, spouse/partner, children, children's ages. C. Populate the table with multiple records which...
Subject - DataBase / MySQL * Which of the following is not correct about the statement...
Subject - DataBase / MySQL * Which of the following is not correct about the statement provided? SELECT Customer#, FirstName, LastName FROM Customers C JOIN Orders O ON C.Customer# = O.Customer# JOIN OrderItems OI ON O.Order# = OI.Order# JOIN Books B ON OI.ISBN = B.ISBN WHERE Category = 'Fitness' AND Category = 'Computers'; Select one: a. Joins the OrderItems table to the Books table using the field ISBN b. All of these are correct c. Joins the Customer table to...
Using PHP and MYSQL and with a simple customer database, how can I create a simple...
Using PHP and MYSQL and with a simple customer database, how can I create a simple log in and registration system for an ecommerce site
Create the actual database using SQL syntax. This is completed using a Database Application (i.e Microsoft...
Create the actual database using SQL syntax. This is completed using a Database Application (i.e Microsoft Access, Oracle, or MySQL) as indicated by your professor. After creating the database – populate it with some data (could be made up). SQL syntax and the DB application will be discussed and taught in class. This is the final deliverable of the group project. Assignment is due by the due date as indicated by your professor. *Make sure to submit the completed database...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT