home / sakila

rental

19 rows where customer_id = 548

✎ 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
177 2005-05-26 04:14:29.000 3545 3545 548 548 2005-06-01 08:16:29.000 2 2 2020-12-23 07:15:22
743 2005-05-29 08:39:02.000 2528 2528 548 548 2005-06-06 08:42:02.000 2 2 2020-12-23 07:15:29
872 2005-05-30 05:03:04.000 3904 3904 548 548 2005-06-06 10:35:04.000 1 1 2020-12-23 07:15:31
1326 2005-06-15 11:07:39.000 59 59 548 548 2005-06-22 05:55:39.000 2 2 2020-12-23 07:15:37
2280 2005-06-18 06:46:54.000 4568 4568 548 548 2005-06-26 09:48:54.000 2 2 2020-12-23 07:15:51
2978 2005-06-20 08:25:16.000 4364 4364 548 548 2005-06-23 05:42:16.000 1 1 2020-12-23 07:16:00
3686 2005-07-06 09:37:50.000 376 376 548 548 2005-07-09 10:15:50.000 2 2 2020-12-23 07:16:11
3777 2005-07-06 13:36:48.000 2470 2470 548 548 2005-07-11 14:26:48.000 1 1 2020-12-23 07:16:12
4155 2005-07-07 09:00:49.000 212 212 548 548 2005-07-13 10:59:49.000 2 2 2020-12-23 07:16:18
5138 2005-07-09 08:00:46.000 1283 1283 548 548 2005-07-12 09:31:46.000 2 2 2020-12-23 07:16:33
6490 2005-07-12 02:28:03.000 2249 2249 548 548 2005-07-19 03:06:03.000 2 2 2020-12-23 07:16:52
9614 2005-07-31 03:59:31.000 2955 2955 548 548 2005-08-08 04:19:31.000 1 1 2020-12-23 07:17:38
10318 2005-08-01 04:36:53.000 885 885 548 548 2005-08-04 00:54:53.000 1 1 2020-12-23 07:17:48
12860 2005-08-19 02:24:41.000 778 778 548 548 2005-08-25 07:43:41.000 1 1 2020-12-23 07:18:23
13584 2006-02-14 15:16:03.000 3966 3966 548 548   2 2 2020-12-23 07:18:34
13691 2005-08-20 09:07:39.000 676 676 548 548 2005-08-28 15:03:39.000 1 1 2020-12-23 07:18:36
13730 2005-08-20 10:17:09.000 1330 1330 548 548 2005-08-28 10:45:09.000 1 1 2020-12-23 07:18:36
14188 2005-08-21 03:32:04.000 4492 4492 548 548 2005-08-22 07:26:04.000 1 1 2020-12-23 07:18:44
14723 2005-08-21 21:52:32.000 2755 2755 548 548 2005-08-31 00:03:32.000 2 2 2020-12-23 07:18:51

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.123ms