home / sakila

rental

21 rows where customer_id = 420

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

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

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
744 2005-05-29 09:13:08.000 3722 3722 420 420 2005-06-01 07:05:08.000 2 2 2020-12-23 07:15:29
2672 2005-06-19 11:42:04.000 1164 1164 420 420 2005-06-25 09:14:04.000 2 2 2020-12-23 07:15:56
2698 2005-06-19 13:29:11.000 3900 3900 420 420 2005-06-20 07:31:11.000 2 2 2020-12-23 07:15:57
2726 2005-06-19 15:02:20.000 2970 2970 420 420 2005-06-21 15:38:20.000 1 1 2020-12-23 07:15:57
4176 2005-07-07 10:03:34.000 2745 2745 420 420 2005-07-16 08:43:34.000 1 1 2020-12-23 07:16:18
5081 2005-07-09 05:25:20.000 1953 1953 420 420 2005-07-13 23:45:20.000 1 1 2020-12-23 07:16:32
5168 2005-07-09 09:20:01.000 4096 4096 420 420 2005-07-11 14:42:01.000 1 1 2020-12-23 07:16:33
5911 2005-07-10 20:51:42.000 4140 4140 420 420 2005-07-14 21:58:42.000 2 2 2020-12-23 07:16:44
6086 2005-07-11 05:29:03.000 1505 1505 420 420 2005-07-16 01:17:03.000 1 1 2020-12-23 07:16:46
6096 2005-07-11 06:18:04.000 2720 2720 420 420 2005-07-14 01:15:04.000 1 1 2020-12-23 07:16:46
6582 2005-07-12 06:28:12.000 2077 2077 420 420 2005-07-19 06:19:12.000 1 1 2020-12-23 07:16:53
6588 2005-07-12 06:57:40.000 1257 1257 420 420 2005-07-16 04:27:40.000 1 1 2020-12-23 07:16:53
7081 2005-07-27 04:25:59.000 462 462 420 420 2005-08-01 00:14:59.000 1 1 2020-12-23 07:17:01
8485 2005-07-29 08:53:09.000 3172 3172 420 420 2005-07-30 11:25:09.000 1 1 2020-12-23 07:17:22
9362 2005-07-30 18:44:16.000 3357 3357 420 420 2005-08-01 20:14:16.000 1 1 2020-12-23 07:17:35
10291 2005-08-01 03:39:57.000 2056 2056 420 420 2005-08-05 02:05:57.000 2 2 2020-12-23 07:17:48
10601 2005-08-01 14:25:40.000 2843 2843 420 420 2005-08-10 09:07:40.000 1 1 2020-12-23 07:17:52
10766 2005-08-01 20:36:29.000 947 947 420 420 2005-08-04 00:30:29.000 1 1 2020-12-23 07:17:55
11236 2005-08-02 13:17:21.000 145 145 420 420 2005-08-09 09:53:21.000 2 2 2020-12-23 07:18:01
14525 2005-08-21 15:06:49.000 3020 3020 420 420 2005-08-22 16:30:49.000 1 1 2020-12-23 07:18:48
15597 2005-08-23 06:21:20.000 3795 3795 420 420 2005-08-28 02:47:20.000 2 2 2020-12-23 07:19:03

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