Question

MYSQL (SAKILLA DATABASE) How many stores are in Lethbridge? How many active customers are they? How...

MYSQL (SAKILLA DATABASE)

  1. How many stores are in Lethbridge?
  2. How many active customers are they?
  3. How many rentals did our customer Mary Smith purchase through our staff member Mike Hillyer?
  4. How many actors were in the film “Casablanca Super”?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per requirement submitted above kindly find below solution.

This demonstration is using MySQL Workbench,

Question 1:

SQL Query :

select count(store_id) as 'Number of stores' from store,address,city where store.address_id=address.address_id and address.city_id=city.city_id and city='Lethbridge'

Screen in MySQL Workbench:

*************************************

Question 2:

SQL Query :

select count(*) as 'Number of active customers' from customer where active=1;

Screen in MySQL Workbench:

*************************************

Question 3:

SQL Query :

select count(rental_id) as 'Number of rentals' from rental,customer,staff
where
rental.customer_id=customer.customer_id and
rental.staff_id=staff.staff_id and customer.first_name='Mary' and customer.last_name='Smith'
and staff.first_name='Mike' and staff.last_name='Hillyer';

Screen in MySQL Workbench:

*************************************

Question 4:

SQL Query :

select count(actor_id) as 'Number of actors' from film_actor,film
where
film_actor.film_id=film.film_id and title='Casablanca Super';

Screen in MySQL Workbench:

*************************************

NOTE :PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
MYSQL (SAKILLA DATABASE) How many stores are in Lethbridge? How many active customers are they? How...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In mySQL Northwind data base. How many of Northwind's customers, that don't work in sales, are...

    In mySQL Northwind data base. How many of Northwind's customers, that don't work in sales, are explicitly identified as "Manager" in their job title? Please use a subquery. What is the total order price for each order listed in Northwind's database? Add to the previous query. Include the Customer ID and Shipping Name for each order that is totaled in the previous query. Sort the output by Customer ID. Add to the previous query. Include the Title of Courtesy, First...

  • Today’s retailers, like cell phone companies and satellite providers, must have an active online presence, or...

    Today’s retailers, like cell phone companies and satellite providers, must have an active online presence, or they will be “left in the dust.” As such, stores with a physical presence must strive to provide unique, personalized service that provides customers with the ability to physically interact with products and trained sales staff. Many customers would prefer to be educated by a trained sales professional before they make a specific buying decision. Unfortunately, though, customers could merely listen to a sales...

  • This is extra information about the shopping database given to answer this question: For many query...

    This is extra information about the shopping database given to answer this question: For many query questions we refer to the following database schema for a website that keeps track of what people like to buy or actually buy in different on-line supermarkets. (Think of something like a cross-store loyalty card system.) customer(cID, cName, street, city) Customers with unique cID and other attributes store(sID, sName, street, city) Stores with a unique ID and other attributes. Stores with the same name...

  • You will develop an E-Commerce database used to maintain customers, products and sales information. You are...

    You will develop an E-Commerce database used to maintain customers, products and sales information. You are required to 1) gather and analyze requirements 2) design logical structure of the database 3) create stored procedures to develop the tables and insert the data 4) write SQL statements for data extraction and reporting. Throughout the course of this semester you have analyzed the requirements for an eCommerce database, designed and developed your database. As a class we have gone through the process...

  • Modern convenience stores realize they have to offer more than late night hours and a diverse...

    Modern convenience stores realize they have to offer more than late night hours and a diverse product assortment to attract customers they have to change with the times or face extinction. Over the years convenience stores have stocked new products and services such as gasoline, lottery tickets, and even internet shopping and delivery services. A walk through any convenience store is likely to reveal in excess of 3,000 different products and services often available 24 hours a day 7 days...

  • Luisa Fernandez pulled into a parking spot behind one of Superado’s stores on the outskirts of Seville but paused before...

    Luisa Fernandez pulled into a parking spot behind one of Superado’s stores on the outskirts of Seville but paused before getting out of the car. This was usually the best part of her week—visiting one of her company’s supermarkets, talking to the store manager, walking through the aisles, watching employees interact with the customers. She’d been doing it since she was a little girl, tagging along with her father as he grew his business from one small market in central...

  • Sandvik Steel, a company selling into many international markets, provides a good illustration of how Internet...

    Sandvik Steel, a company selling into many international markets, provides a good illustration of how Internet revenue contribution can be used to set objectives for different geographical markets. When dot‐com mania was at its height, so‐called old economy companies, such as Sweden’s Sandvik, tended to be overshadowed as the brash new online stars took the limelight. But now that the collapse of Internet and other technology stocks has injected a harsh dose of reality into the stock market and business...

  • Lauren’s balancing Act DeMarco’s Department Store manager Lauren Brewster’s “Wow” moment came when she observed a...

    Lauren’s balancing Act DeMarco’s Department Store manager Lauren Brewster’s “Wow” moment came when she observed a Chicago restaurant staff ’s gushing treatment of an international celebrity. “Everyone dreams of that kind of star treatment,” Lauren told her assistant, Jack Klein. “Think about it. People brag about their bank or the local bar where ‘everybody knows your name,’ or enjoy showing off a favorite restaurant where the hostess always remembers their favorite table.” DeMarco’s, like other upscale department stores, suffered the...

  • 140 Part 3 LIFE: Feedback Consider this Case Fear of Feedback magazine article on customer service...

    140 Part 3 LIFE: Feedback Consider this Case Fear of Feedback magazine article on customer service began to customers--and this had caused a lot of positive word with a quote that ing what customers really think about us is fear. We fear said, "The biggest obstacle to know- of mouth for that company le described a toy retailer that million cus- Another examp tell us our product or service stinks, that we're sends out weekly surveys to its database of...

  • Define Starbucks’ niche in the coffeehouse marketplace, both in its early days and today… Discuss the...

    Define Starbucks’ niche in the coffeehouse marketplace, both in its early days and today… Discuss the factors that caused Starbucks' sales to stumble in the mid-to-late 2000s. If you were the CEO at the time, how would you have reversed this trend? What comes next for Starbucks? What new marketing strategies might the company develop to remain relevant? 2. Company and Marketing Strategy Partnering to Build Customer Engagement, Value, and | Relationships CHAPTER PREVIEW In the first chapter, we explored...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT