Question
MySQL - Please provide screenshot /******************************************************** * This script creates the database named my_guitar_shop *********************************************************/ DROP DATABASE IF EXISTS cs431_music_store; CREATE DATABASE cs431_music_store; USE cs431_music_store;
MySQL - Please provide screenshot
/******************************************************** * This script creates the database named my_guitar_shop *********************************************************/
DROP DATABASE IF EXISTS cs431_music_store; CREATE DATABASE cs431_music_store; USE cs431_music_store;
-- create the tables for the database CREATE TABLE categories ( category_id INT PRIMARY KEY AUTO_INCREMENT, category_name VARCHAR(255) NOT NULL UNIQUE );
CREATE TABLE instruments ( instrument_id INT PRIMARY KEY AUTO_INCREMENT, category_id INT NOT NULL, instrument_code VARCHAR(10) NOT NULL UNIQUE, instrument_name VARCHAR(255) NOT NULL, description TEXT NOT NULL, list_price DECIMAL(10,2) NOT NULL, discount_percent DECIMAL(10,2) NOT NULL DEFAULT 0.00, date_added DATETIME DEFAULT NULL, CONSTRAINT instruments_fk_categories FOREIGN KEY (category_id) REFERENCES categories (category_id) );
1. Write a SELECT statement that returns these columns from the Instruments table: instrument_name, list_price, date_added Return only the rows with a list price that's greater than 500 and less than 2000. Sort the result set by the date_added column in descending sequence. This should return 5 rows. A1 x fx Query 1 A B 1 Query 1 instrument_name list_price date_added 2018-07-30 13:14:15 3 2 Yamaha PSR- 799.99 SX900 61-key High- Level Arranger Keyboard 3 Roland FANTOM-6 699.99 Music Workstation 4 Keyboard Etude EAS-100 799.99 Student Alto Saxophone 5 Lacquer Gibson Les Paul 1199.00 2018-07-30 12:46:40 2018-06-01 11:29:35 5 2017-12-05 16:33:13 6 699.00 Fender Stratocaster 2017-10-30 09:32:40 7Step 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