home / sakila

rental

23 rows where customer_id = 392

✎ 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
1530 2005-06-16 00:38:07.000 2421 2421 392 392 2005-06-24 02:45:07.000 2 2 2020-12-23 07:15:40
1764 2005-06-16 17:51:54.000 705 705 392 392 2005-06-21 20:36:54.000 2 2 2020-12-23 07:15:43
2289 2005-06-18 07:29:43.000 2030 2030 392 392 2005-06-24 11:16:43.000 2 2 2020-12-23 07:15:51
2890 2005-06-20 02:00:45.000 3437 3437 392 392 2005-06-27 21:12:45.000 1 1 2020-12-23 07:15:59
3566 2005-07-06 03:08:51.000 2774 2774 392 392 2005-07-12 05:04:51.000 1 1 2020-12-23 07:16:09
6061 2005-07-11 04:06:25.000 1859 1859 392 392 2005-07-11 23:11:25.000 1 1 2020-12-23 07:16:46
6406 2005-07-11 22:55:27.000 4439 4439 392 392 2005-07-20 04:50:27.000 2 2 2020-12-23 07:16:51
7692 2005-07-28 03:30:21.000 267 267 392 392 2005-07-30 22:25:21.000 1 1 2020-12-23 07:17:10
7981 2005-07-28 14:18:25.000 90 90 392 392 2005-08-04 15:21:25.000 2 2 2020-12-23 07:17:14
8254 2005-07-29 00:59:31.000 1787 1787 392 392 2005-08-03 23:43:31.000 2 2 2020-12-23 07:17:18
8612 2005-07-29 13:28:20.000 3518 3518 392 392 2005-08-06 14:39:20.000 2 2 2020-12-23 07:17:24
10085 2005-07-31 20:12:02.000 2556 2556 392 392 2005-08-03 00:03:02.000 2 2 2020-12-23 07:17:45
10435 2005-08-01 08:50:51.000 1934 1934 392 392 2005-08-08 12:23:51.000 1 1 2020-12-23 07:17:50
11459 2005-08-02 21:25:25.000 3730 3730 392 392 2005-08-04 19:57:25.000 2 2 2020-12-23 07:18:04
11686 2005-08-17 06:39:30.000 1393 1393 392 392 2005-08-21 10:19:30.000 2 2 2020-12-23 07:18:07
12102 2005-08-17 22:45:26.000 4268 4268 392 392 2005-08-24 01:47:26.000 2 2 2020-12-23 07:18:13
12368 2005-08-18 07:57:38.000 3777 3777 392 392 2005-08-25 05:49:38.000 2 2 2020-12-23 07:18:16
12561 2005-08-18 14:58:51.000 812 812 392 392 2005-08-20 10:53:51.000 1 1 2020-12-23 07:18:19
13629 2005-08-20 07:04:07.000 1834 1834 392 392 2005-08-25 12:36:07.000 1 1 2020-12-23 07:18:35
14081 2005-08-20 23:35:13.000 589 589 392 392 2005-08-28 01:41:13.000 2 2 2020-12-23 07:18:42
14223 2005-08-21 04:51:51.000 514 514 392 392 2005-08-29 00:37:51.000 1 1 2020-12-23 07:18:44
14369 2005-08-21 09:33:44.000 1636 1636 392 392 2005-08-25 08:56:44.000 1 1 2020-12-23 07:18:46
14438 2005-08-21 11:51:10.000 1621 1621 392 392 2005-08-28 17:10:10.000 1 1 2020-12-23 07:18:47

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