Write a query containing a subquery to display the total numberof rentals for the customer (unknown before query) who belongs tothe city London. Exact result display as the following:
Table: rental
Table: customer
rental_id rental_date 12345C IZG ▶1 6 9 10 12 12 inventory_id customer_id return_date 2005-05-24 22:53:30 367 2005-05-24 22:54:33 1525 2005-05-24 23:03:39 1711 2005-05-24 23:04:41 2452 2005-05-24 23:05:21 2079 2005-05-24 23:08:07 2792 2005-05-24 23:11:53 3995 2005-05-24 23:31:46 2346 2005-05-25 00:00:40 2580 2005-05-25 00:02:21 1824 2005-05-25 00:09:02 4443 2005-05-25 00:19:27 1584 2005-05-25.00-22:56 2201 130 459 408 333 222 549 269 239 126 399 142 261 331 staff_id last_update 2005-05-26 22:04:30 1 2005-05-28 19:40:33 1 2005-06-01 22:12:39 1 2005-06-03 01:43:41 2 2005-06-02 04:33:21 1 2005-05-27 01:32:07 1 2005-05-29 20:34:53 2 2005-05-27 23:33:46 2 2005-05-28 00:22:40 1 2005-05-31 22:44:21 2 2005-06-02 20:56:02 2 2005-05-30 05:44:27 2 2005-05-30.01.28:56 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21:30:53 2006-02-15 21-30-52
customer_id store_id 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 1 1 2 1 2 1 -2212-22 first_name last_name email MARY SMITH [email protected] 5 PATRICIA JOHNSON 6 LINDA 7 8 BARBARA JONES ELIZABETH BROWN 9 JENNIFER DAVIS 10 11 [email protected] WILLIAMS [email protected] [email protected] [email protected] [email protected] MILLER [email protected] WILSON [email protected] MARGARET MOORE [email protected] 13 DOROTHY TAYLOR [email protected] LISA ANDERS... [email protected] THOMAS [email protected] JACKSON [email protected] WHITE [email protected] 12 14 15 16 17 18 MARIA SUSAN address_id active create_date NANCY KAREN BETTY last_update 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04:5 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04: 2006-02-14 22:04:36 2006-02-15 04:5 2006-02-14 22:04:36 2006-02-15 04: 2006-02-15 04: 2006-02-14 22:04:36 2006-02-14 22:04:36 2006-02-15 04:5 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Write a query containing a subquery to display the total number of rentals for the customer (unknown before query) who b
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am