What is MySQL? How do you install MySQL? How do you create a new database in MySQL?

What is MySQL? How do you install MySQL? How do you create a new database in MySQL?

Question:

What is MySQL? How do you install MySQL? How do you create a new database in MySQL? What is a table in MySQL? How do you create a new table in MySQL? How do you add a column to an existing MySQL table? How do you delete a column from an existing MySQL table? How do you rename a column in an existing MySQL table? How do you insert data into a MySQL table? How do you update data in a MySQL table? How do you delete data from a MySQL table?  What is a primary key in MySQL? How do you create a primary key in a MySQL table? How do you drop a primary key from a MySQL table? What is a foreign key in MySQL? How do you create a foreign key in a MySQL table? How do you drop a foreign key from a MySQL table? What is a unique key in MySQL? How do you create a unique key in a MySQL table? How do you drop a unique key from a MySQL table? What is an index in MySQL? How do you create an index in a MySQL table? How do you drop an index from a MySQL table? What is a view in MySQL? How do you create a view in MySQL? How do you drop a view from MySQL?What is a trigger in MySQL?How do you create a trigger in MySQL?How do you drop a trigger from MySQL?What is a stored procedure in MySQL?How do you create a stored procedure in MySQL?How do you drop a stored procedure from MySQL?What is a cursor in MySQL?How do you declare a cursor in MySQL?How do you open a cursor in MySQL?How do you fetch data from a cursor in MySQL?How do you close a cursor in MySQL?What is a temporary table in MySQL?How do you create a temporary table in MySQL?How do you drop a temporary table from MySQL?What is a transaction in MySQL?How do you begin a transaction in MySQL?How do you commit a transaction in MySQL?How do you rollback a transaction in MySQL?What is a subquery in MySQL?How do you write a subquery in MySQL?What is a join in MySQL?How do you write an inner join in MySQL?How do you write a left join in MySQL?How do you write a right join in MySQL? Part 2:   1. Write a SQL query to find the top 5 highest paid employees in a company, including their names and salaries.  2. Write a SQL query to find the average salary of all employees in each department of a company. 3. Write a SQL query to find the total sales revenue for each product category in a given time period.  4. Write a SQL query to find the number of orders placed by each customer, sorted by the number of orders in descending order.  5. Write a SQL query to find the customers who have made orders for all products in a given category.  6. Write a SQL query to find the top 10 most ordered products, including the product name, price, and number of orders.  7. Write a SQL query to find the customers who have not placed an order in the last 6 months.  8. Write a SQL query to find the average time between a customer’s first order and their second order.   9. Write a SQL query to find the sales growth rate for each month, compared to the same month in the previous year.   10. Write a SQL query to find the most profitable sales region, based on total revenue and total costs. 

Expert Answer:

Answer rating: 100% (QA)

1 What is MySQL MySQL is an open source relational database management system RDBMS that allows users to manage and store data in a structured format It uses the SQL Structured Query Language for quer
View the full answer