Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MYSQL coding help Attached are pictures of the database, tables and content within the database. Task 1: Insert Records to Image Table Construct the SQL

MYSQL coding help

Attached are pictures of the database, tables and content within the database.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Task 1: Insert Records to Image Table Construct the SQL statement to insert 5 new records in the image table.

Task 2: Insert Records to Message-Image Table Construct the SQL statement to insert 5 new records in the message_image intersection table. Note: You are required to add at least one record where at least one of Michael Phelp's messages includes at least one image. Also, you are required to add at least one message that has multiple images.

Task 3: Find All of the Messages that Michael Phelps Sent Construct the SQL statement to find all of the messages that Michael Phelps sent. Note: You must use the WHERE clause to set the conditions for this query. Display the following columns: - Sender's first name - Sender's last name - Receiver's first name - Receiver's last name - Message ID - Message - Message Timestamp

Task 4: Find the Number of Messages Sent for Every Person Construct the SQL statement to find the number of messages sent for every person. Note: You must use the WHERE clause to set the conditions for this query. Display the following columns: - Count of messages - Person ID - First Name - Last Name

Task 15: Find All of the Messages that Have At Least One Image Attached Using INNER JOINs Construct the SQL statement to find all of the messages that have at least one image attached using INNER JOINs. Note: For messages with multiple images, display only the first image for the message. Display the following columns: - Message ID - Message - Message Timestamp - First Image Name - First Image Location

mysql> SHOW TABLES; I Tables in messaging I contact list image I message I message image I person 5 rows in set (0.00 sec)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

1. What do you want to accomplish in this meeting?

Answered: 1 week ago

Question

Question What is a Roth 401(k) feature?

Answered: 1 week ago