home / sakila

rental

20 rows where customer_id = 310

✎ 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
104 2005-05-25 17:46:33.000 4281 4281 310 310 2005-05-27 15:20:33.000 1 1 2020-12-23 07:15:21
1162 2005-06-14 23:09:38.000 987 987 310 310 2005-06-23 22:00:38.000 1 1 2020-12-23 07:15:35
1333 2005-06-15 11:37:08.000 448 448 310 310 2005-06-16 10:13:08.000 2 2 2020-12-23 07:15:37
1918 2005-06-17 05:40:14.000 3749 3749 310 310 2005-06-21 08:53:14.000 2 2 2020-12-23 07:15:46
2088 2005-06-17 17:35:30.000 506 506 310 310 2005-06-23 20:13:30.000 2 2 2020-12-23 07:15:48
2480 2005-06-18 21:04:09.000 4078 4078 310 310 2005-06-22 16:24:09.000 1 1 2020-12-23 07:15:54
2618 2005-06-19 08:03:01.000 2465 2465 310 310 2005-06-24 03:23:01.000 2 2 2020-12-23 07:15:56
3830 2005-07-06 16:01:16.000 553 553 310 310 2005-07-15 19:35:16.000 2 2 2020-12-23 07:16:13
4072 2005-07-07 04:48:02.000 3130 3130 310 310 2005-07-12 10:32:02.000 2 2 2020-12-23 07:16:17
5621 2005-07-10 05:34:10.000 552 552 310 310 2005-07-14 02:49:10.000 1 1 2020-12-23 07:16:40
5836 2005-07-10 16:49:02.000 1842 1842 310 310 2005-07-11 22:35:02.000 2 2 2020-12-23 07:16:43
7648 2005-07-28 01:35:33.000 797 797 310 310 2005-08-04 06:21:33.000 2 2 2020-12-23 07:17:09
8637 2005-07-29 14:30:11.000 1069 1069 310 310 2005-08-04 14:00:11.000 1 1 2020-12-23 07:17:24
8981 2005-07-30 04:25:30.000 4413 4413 310 310 2005-08-06 02:37:30.000 1 1 2020-12-23 07:17:29
9536 2005-07-31 01:19:02.000 2547 2547 310 310 2005-08-02 19:38:02.000 1 1 2020-12-23 07:17:37
11137 2005-08-02 09:25:31.000 2500 2500 310 310 2005-08-08 08:10:31.000 1 1 2020-12-23 07:17:59
12500 2005-08-18 13:05:51.000 36 36 310 310 2005-08-19 14:54:51.000 2 2 2020-12-23 07:18:18
12710 2005-08-18 21:02:50.000 3011 3011 310 310 2005-08-26 15:07:50.000 2 2 2020-12-23 07:18:21
12929 2005-08-19 05:05:23.000 1531 1531 310 310 2005-08-25 04:37:23.000 1 1 2020-12-23 07:18:24
14972 2005-08-22 06:53:21.000 3422 3422 310 310 2005-08-29 02:25:21.000 1 1 2020-12-23 07:18:54

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