home / sakila

rental

32 rows where customer_id = 406

✎ 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
855 2005-05-30 02:00:28.000 2527 2527 406 406 2005-06-03 20:16:28.000 2 2 2020-12-23 07:15:31
2113 2005-06-17 19:57:46.000 1509 1509 406 406 2005-06-24 00:22:46.000 1 1 2020-12-23 07:15:48
2150 2005-06-17 22:50:36.000 1910 1910 406 406 2005-06-21 19:33:36.000 1 1 2020-12-23 07:15:49
2241 2005-06-18 04:31:41.000 921 921 406 406 2005-06-24 22:34:41.000 2 2 2020-12-23 07:15:50
2325 2005-06-18 10:08:07.000 752 752 406 406 2005-06-21 15:07:07.000 1 1 2020-12-23 07:15:52
2585 2005-06-19 05:05:03.000 91 91 406 406 2005-06-20 09:28:03.000 1 1 2020-12-23 07:15:55
3186 2005-06-20 23:04:20.000 3198 3198 406 406 2005-06-29 02:56:20.000 2 2 2020-12-23 07:16:03
3306 2005-06-21 07:46:58.000 1669 1669 406 406 2005-06-26 11:22:58.000 2 2 2020-12-23 07:16:05
4264 2005-07-07 14:25:28.000 3499 3499 406 406 2005-07-08 08:49:28.000 2 2 2020-12-23 07:16:19
5098 2005-07-09 06:13:54.000 1772 1772 406 406 2005-07-10 04:27:54.000 1 1 2020-12-23 07:16:32
5263 2005-07-09 14:10:36.000 119 119 406 406 2005-07-12 15:07:36.000 1 1 2020-12-23 07:16:34
5766 2005-07-10 13:07:31.000 7 7 406 406 2005-07-16 13:03:31.000 1 1 2020-12-23 07:16:42
6439 2005-07-12 00:23:48.000 3463 3463 406 406 2005-07-13 00:54:48.000 2 2 2020-12-23 07:16:51
7109 2005-07-27 05:28:57.000 1658 1658 406 406 2005-08-04 10:41:57.000 2 2 2020-12-23 07:17:01
7171 2005-07-27 07:58:35.000 4381 4381 406 406 2005-08-03 07:45:35.000 1 1 2020-12-23 07:17:02
7259 2005-07-27 11:06:00.000 2345 2345 406 406 2005-08-02 06:44:00.000 2 2 2020-12-23 07:17:04
7604 2005-07-27 23:54:52.000 3720 3720 406 406 2005-08-05 03:04:52.000 2 2 2020-12-23 07:17:09
8080 2005-07-28 18:05:06.000 3035 3035 406 406 2005-07-29 22:44:06.000 2 2 2020-12-23 07:17:16
8295 2005-07-29 02:42:14.000 2065 2065 406 406 2005-07-30 22:22:14.000 1 1 2020-12-23 07:17:19
8630 2005-07-29 14:07:59.000 1378 1378 406 406 2005-08-03 13:18:59.000 2 2 2020-12-23 07:17:24
8903 2005-07-30 01:08:06.000 4546 4546 406 406 2005-07-30 21:47:06.000 2 2 2020-12-23 07:17:28
8962 2005-07-30 03:43:45.000 4439 4439 406 406 2005-08-07 00:33:45.000 1 1 2020-12-23 07:17:29
9224 2005-07-30 13:25:37.000 2260 2260 406 406 2005-08-01 15:13:37.000 2 2 2020-12-23 07:17:33
9291 2005-07-30 16:03:39.000 2884 2884 406 406 2005-08-05 11:11:39.000 2 2 2020-12-23 07:17:34
9487 2005-07-30 23:40:22.000 2165 2165 406 406 2005-08-01 22:29:22.000 1 1 2020-12-23 07:17:36
9660 2005-07-31 06:03:17.000 1090 1090 406 406 2005-08-07 06:59:17.000 2 2 2020-12-23 07:17:39
10632 2005-08-01 15:36:56.000 1290 1290 406 406 2005-08-05 17:32:56.000 1 1 2020-12-23 07:17:53
11603 2005-08-17 03:22:10.000 3910 3910 406 406 2005-08-18 06:48:10.000 1 1 2020-12-23 07:18:06
12505 2005-08-18 13:17:30.000 3741 3741 406 406 2005-08-23 18:03:30.000 1 1 2020-12-23 07:18:18
14205 2005-08-21 03:57:15.000 315 315 406 406 2005-08-30 08:46:15.000 2 2 2020-12-23 07:18:44
14421 2005-08-21 11:20:21.000 4402 4402 406 406 2005-08-24 06:26:21.000 1 1 2020-12-23 07:18:47
14601 2005-08-21 17:45:52.000 548 548 406 406 2005-08-29 15:10:52.000 1 1 2020-12-23 07:18:49

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