home / sakila

rental

36 rows where customer_id = 354

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
140 2005-05-25 23:34:22.000 655 655 354 354 2005-05-27 01:10:22.000 1 1 2020-12-23 07:15:22
158 2005-05-26 01:27:11.000 2395 2395 354 354 2005-06-03 00:30:11.000 2 2 2020-12-23 07:15:22
402 2005-05-27 13:17:18.000 461 461 354 354 2005-05-30 08:53:18.000 2 2 2020-12-23 07:15:25
1491 2005-06-15 21:48:18.000 848 848 354 354 2005-06-20 16:40:18.000 1 1 2020-12-23 07:15:39
2275 2005-06-18 06:31:29.000 2805 2805 354 354 2005-06-24 10:04:29.000 2 2 2020-12-23 07:15:51
2769 2005-06-19 17:52:14.000 1222 1222 354 354 2005-06-26 20:30:14.000 2 2 2020-12-23 07:15:58
3139 2005-06-20 19:44:45.000 3474 3474 354 354 2005-06-23 16:24:45.000 1 1 2020-12-23 07:16:03
3821 2005-07-06 15:36:20.000 4385 4385 354 354 2005-07-11 20:04:20.000 1 1 2020-12-23 07:16:13
4034 2005-07-07 02:36:33.000 1666 1666 354 354 2005-07-09 08:32:33.000 2 2 2020-12-23 07:16:16
4449 2005-07-07 23:18:58.000 2813 2813 354 354 2005-07-15 20:40:58.000 2 2 2020-12-23 07:16:22
4745 2005-07-08 13:45:09.000 1351 1351 354 354 2005-07-12 18:54:09.000 1 1 2020-12-23 07:16:27
5354 2005-07-09 18:04:33.000 951 951 354 354 2005-07-15 18:19:33.000 1 1 2020-12-23 07:16:36
5556 2005-07-10 03:10:17.000 4483 4483 354 354 2005-07-14 02:47:17.000 1 1 2020-12-23 07:16:39
5873 2005-07-10 19:02:10.000 3151 3151 354 354 2005-07-14 19:13:10.000 2 2 2020-12-23 07:16:43
6054 2005-07-11 03:58:39.000 1176 1176 354 354 2005-07-13 23:08:39.000 1 1 2020-12-23 07:16:46
6838 2005-07-12 19:01:30.000 3492 3492 354 354 2005-07-17 23:42:30.000 1 1 2020-12-23 07:16:57
6926 2005-07-26 22:52:45.000 1276 1276 354 354 2005-07-28 18:32:45.000 1 1 2020-12-23 07:16:59
6939 2005-07-26 23:17:51.000 278 278 354 354 2005-08-03 21:12:51.000 2 2 2020-12-23 07:16:59
7148 2005-07-27 07:04:09.000 1783 1783 354 354 2005-08-03 10:20:09.000 2 2 2020-12-23 07:17:02
7235 2005-07-27 10:09:30.000 1261 1261 354 354 2005-08-05 11:44:30.000 2 2 2020-12-23 07:17:03
7241 2005-07-27 10:25:49.000 2433 2433 354 354 2005-07-28 05:30:49.000 2 2 2020-12-23 07:17:03
8321 2005-07-29 03:50:54.000 1875 1875 354 354 2005-08-01 02:08:54.000 1 1 2020-12-23 07:17:19
8477 2005-07-29 08:40:36.000 3571 3571 354 354 2005-08-06 08:28:36.000 2 2 2020-12-23 07:17:22
8609 2005-07-29 13:19:25.000 3997 3997 354 354 2005-08-06 08:33:25.000 2 2 2020-12-23 07:17:24
8921 2005-07-30 02:04:02.000 1016 1016 354 354 2005-07-31 06:18:02.000 1 1 2020-12-23 07:17:28
9130 2005-07-30 09:55:10.000 1715 1715 354 354 2005-08-04 08:57:10.000 1 1 2020-12-23 07:17:31
10420 2005-08-01 08:13:53.000 3490 3490 354 354 2005-08-06 08:05:53.000 2 2 2020-12-23 07:17:49
11782 2006-02-14 15:16:03.000 4098 4098 354 354   1 1 2020-12-23 07:18:08
12243 2005-08-18 03:38:54.000 1829 1829 354 354 2005-08-27 06:56:54.000 2 2 2020-12-23 07:18:15
12544 2005-08-18 14:25:51.000 3783 3783 354 354 2005-08-26 18:42:51.000 1 1 2020-12-23 07:18:19
12759 2006-02-14 15:16:03.000 4193 4193 354 354   2 2 2020-12-23 07:18:22
12998 2005-08-19 07:32:16.000 2301 2301 354 354 2005-08-24 01:56:16.000 2 2 2020-12-23 07:18:25
14212 2005-08-21 04:29:26.000 4540 4540 354 354 2005-08-24 00:46:26.000 2 2 2020-12-23 07:18:44
14245 2005-08-21 05:30:54.000 975 975 354 354 2005-08-26 07:02:54.000 1 1 2020-12-23 07:18:44
14840 2005-08-22 01:58:42.000 1240 1240 354 354 2005-08-29 22:32:42.000 2 2 2020-12-23 07:18:52
15956 2005-08-23 19:19:21.000 2763 2763 354 354 2005-08-25 22:15:21.000 2 2 2020-12-23 07:19:09

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE rental (
  rental_id INT NOT NULL,
  rental_date TIMESTAMP NOT NULL,
  inventory_id INT  NOT NULL,
  customer_id INT  NOT NULL,
  return_date TIMESTAMP DEFAULT NULL,
  staff_id SMALLINT  NOT NULL,
  last_update TIMESTAMP NOT NULL,
  PRIMARY KEY (rental_id),
  CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id) ,
  CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id) ,
  CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id)
);
CREATE INDEX idx_rental_fk_inventory_id ON rental(inventory_id)
;
CREATE INDEX idx_rental_fk_customer_id ON rental(customer_id)
;
CREATE INDEX idx_rental_fk_staff_id ON rental(staff_id)
;
CREATE UNIQUE INDEX idx_rental_uq  ON rental (rental_date,inventory_id,customer_id)
;
Powered by Datasette · Queries took 16.019ms