0% found this document useful (0 votes)
14 views

Mysql-Week 11 Challenge 1724503752

SQL

Uploaded by

nityajoycev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Mysql-Week 11 Challenge 1724503752

SQL

Uploaded by

nityajoycev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Mysql-Week 11 Challenge

Q.1 Install add-in for MySQL for MS Excel


Step 1. Download MySQL for Excel:
 Go to the MySQL for Excel download page.
 Download the installer file (e.g., mysql-for-excel-1.3.8.msi).
Step 2. Install the Add-In:
 Run the downloaded installer file and follow the on-screen instructions to
complete the installation.
Step 3. Enable the Add-In in Excel:
 Open Excel.
 Go to the Data tab.
 You should see the MySQL for Excel option. If not, go to File > Options > Add-Ins.
 In the Manage box, select COM Add-ins and click Go.
 Check the box for MySQL for Excel and click OK.
Step 4. Connect to MySQL:
 In the Data tab, click on MySQL for Excel.
 Enter your MySQL server details to connect and start importing/exporting data.

Q2. Access Schema Sakila through MS Excel

To access the Sakila schema through MS Excel, follow these steps:

Step 1. Install MySQL for Excel Add-In:


o If you haven’t already, download and install the MySQL for Excel add-in from
the MySQL website.
Step 2. Load the Sakila Database:
o Ensure the Sakila database is installed on your MySQL server. You can
download the Sakila schema and data files from the MySQL documentation
and load them using MySQL Workbench or the MySQL command line.
Step 3. Open Excel and Connect to MySQL:
o Open Excel and go to the Data tab.
o Click on MySQL for Excel to open the add-in.
o Click New Connection and enter your MySQL server details to connect.

Step 4. Access the Sakila Schema:

o Once connected, you will see a list of available schemas. Select sakil.
o You can now browse the tables and views within the Sakila schema.
o To import data, select the desired table and click Import MySQL Data.

Step 5. Work with the Data:

o The data from the Sakila schema will be imported into Excel, where you can analyze
and manipulate it as need
Q 3 Ans.
Step 1. Install MySQL for Excel:
o Download and install the MySQL for Excel add-in.
Step 2. Open Excel:
o Go to the Data tab.
o Click MySQL for Excel.
Step 3. Connect to MySQL:
o Enter your MySQL server details.
o Select the sakila schema.
Step 4. Import Data:
o Select the customer, actor, film_category, and inventory tables.
o Click Import MySQL Data.
Step 5. Create PivotTable:
o Select any cell in the imported data.
o Go to the Insert tab.
o Click PivotTable.
o Choose where to place the PivotTable and click OK.
Step 6. Design PivotTable:
o Drag and drop fields to Rows, Columns, Values, and Filters areas.
Step 7. Add Data Summary:
o Use Excel functions like SUM, AVERAGE, COUNT for summaries.

Q.4 Do insertion of new 10 rows in table film_text


through MS Excel

Step 1. Open Excel:


o Go to the Data tab.
o Click MySQL for Excel.
Step 2. Connect to MySQL:
o Enter your MySQL server details.
o Select the sakila schema.
Step 3. Import film_text Table:
o Select the film_text table.
o Click Import MySQL Data.
Step 4. Add New Rows:
o Scroll to the bottom of the table in Excel.
o Enter data for 10 new rows.
Step 5. Export Data Back to MySQL:
o Click Export Data in the MySQL for Excel panel.
o Choose Append Data to add the new rows to the film_text table.
Q.5 Append data of table rental through MS Excel with
5 rows
Step 1: Connect Excel to Your Database

1. Open MS Excel.
2. Go to the Data tab and click on Get Data.
3. Choose From Database → From SQL Server Database (or another database type
you're using).
4. Enter the server and database credentials to connect.

Step 2: Load the rental Table into Excel

1. After connecting, select the rental table from the database.


2. Load it into Excel by clicking Load.

Step 3: Add New Data

1. Scroll to the bottom of the table in Excel.


2. Insert 5 new rows below the last row.
3. Enter the data in these rows, ensuring you follow the structure of the table (e.g.,
rental_id, rental_date, inventory_id, customer_id, return_date, staff_id,
etc.).

Step 4: Export the Data Back to the Database

1. Go to the Data tab again.


2. Click on Existing Connections, select the rental table, and click Load To.
3. Choose to create a connection and add this data to the Data Model.
4. Go to Table Tools → Design → Publish and Export.
5. Select Export → Export to SQL Server (or your specific database).

Step 5: Verify the Update

1. Once the data is exported, check your rental table in your database management tool to
ensure the 5 new rows have been appended.
Q.6 Export data of view customer_list (rows where value of
field notes is NULL) into newcustomer_list through MS
Excel

Step 1: Connect to the Database

1. Open Excel and go to the Data tab.


2. Click Get Data → From Database → From SQL Server Database (or your respective
database type).
3. Enter your server name, database, and credentials to connect.

Step 2: Load the customer_list View

1. In the Navigator window, select the customer_list view.


2. Click Transform Data to open the Power Query Editor.

Step 3: Filter the Data

1. In the Power Query Editor, find the notes column.


2. Click the filter dropdown on the notes column.
3. Uncheck all values and check only NULL to filter rows where notes is NULL.

Step 4: Load the Data into a New Excel Sheet

1. Click Close & Load To... in the Power Query Editor.


2. Choose New Worksheet and rename it to newcustomer_list.
3. Click Load to load the filtered data into the new sheet.

-: THANK YOU:-

Hello mam/sir.
I am Rahul,
And I am completing the MySQL-Week-11 Challenge in MS Word files,
Because I have Microsoft Excel 2016, Perhaps not have been able to work
with MySQL for this reason,

You might also like