home / sakila

rental

29 rows where customer_id = 447

✎ 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
461 2005-05-27 20:08:55.000 2077 2077 447 447 2005-06-01 14:32:55.000 1 1 2020-12-23 07:15:26
732 2005-05-29 07:32:51.000 2530 2530 447 447 2005-05-30 10:08:51.000 2 2 2020-12-23 07:15:29
1230 2005-06-15 04:04:09.000 2324 2324 447 447 2005-06-16 02:21:09.000 1 1 2020-12-23 07:15:36
1890 2005-06-17 04:06:13.000 1764 1764 447 447 2005-06-22 07:46:13.000 2 2 2020-12-23 07:15:45
2025 2005-06-17 13:04:00.000 1203 1203 447 447 2005-06-18 18:45:00.000 2 2 2020-12-23 07:15:47
2285 2005-06-18 07:00:54.000 755 755 447 447 2005-06-25 08:58:54.000 2 2 2020-12-23 07:15:51
4403 2005-07-07 21:29:40.000 3973 3973 447 447 2005-07-09 17:58:40.000 1 1 2020-12-23 07:16:22
4858 2005-07-08 18:53:24.000 3424 3424 447 447 2005-07-17 20:32:24.000 2 2 2020-12-23 07:16:28
5331 2005-07-09 16:54:06.000 4181 4181 447 447 2005-07-10 19:04:06.000 1 1 2020-12-23 07:16:35
5734 2005-07-10 11:37:28.000 399 399 447 447 2005-07-16 11:10:28.000 1 1 2020-12-23 07:16:41
5987 2005-07-11 00:55:31.000 1000 1000 447 447 2005-07-16 06:28:31.000 2 2 2020-12-23 07:16:45
6651 2005-07-12 10:57:28.000 98 98 447 447 2005-07-15 06:06:28.000 2 2 2020-12-23 07:16:54
6690 2005-07-12 12:23:02.000 4254 4254 447 447 2005-07-16 15:39:02.000 2 2 2020-12-23 07:16:55
8537 2005-07-29 10:44:54.000 1012 1012 447 447 2005-08-06 14:55:54.000 2 2 2020-12-23 07:17:22
8945 2005-07-30 03:11:48.000 1441 1441 447 447 2005-08-07 07:53:48.000 2 2 2020-12-23 07:17:28
9076 2005-07-30 07:58:12.000 496 496 447 447 2005-08-08 06:04:12.000 1 1 2020-12-23 07:17:30
9288 2005-07-30 15:56:39.000 2640 2640 447 447 2005-08-04 13:25:39.000 2 2 2020-12-23 07:17:33
10425 2005-08-01 08:23:25.000 322 322 447 447 2005-08-05 04:29:25.000 1 1 2020-12-23 07:17:50
10957 2005-08-02 03:33:30.000 1652 1652 447 447 2005-08-10 06:19:30.000 2 2 2020-12-23 07:17:57
11108 2005-08-02 08:20:01.000 560 560 447 447 2005-08-03 13:22:01.000 2 2 2020-12-23 07:17:59
11465 2005-08-02 21:43:52.000 2190 2190 447 447 2005-08-10 22:24:52.000 1 1 2020-12-23 07:18:04
12511 2005-08-18 13:23:19.000 919 919 447 447 2005-08-22 11:43:19.000 2 2 2020-12-23 07:18:18
13072 2005-08-19 10:03:30.000 2313 2313 447 447 2005-08-22 14:27:30.000 2 2 2020-12-23 07:18:26
13110 2005-08-19 11:24:37.000 62 62 447 447 2005-08-21 05:48:37.000 1 1 2020-12-23 07:18:27
13848 2005-08-20 14:37:49.000 802 802 447 447 2005-08-25 13:15:49.000 1 1 2020-12-23 07:18:38
14443 2005-08-21 12:06:32.000 376 376 447 447 2005-08-29 13:44:32.000 2 2 2020-12-23 07:18:47
15108 2005-08-22 12:10:07.000 3463 3463 447 447 2005-08-26 14:46:07.000 2 2 2020-12-23 07:18:56
15997 2005-08-23 20:40:31.000 2843 2843 447 447 2005-08-26 19:47:31.000 1 1 2020-12-23 07:19:09
16032 2005-08-23 21:59:57.000 2527 2527 447 447 2005-08-31 22:46:57.000 2 2 2020-12-23 07:19:10

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 11.016ms