home / sakila

rental

27 rows where customer_id = 580

✎ 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
611 2005-05-28 15:18:18.000 1230 1230 580 580 2005-05-31 20:15:18.000 2 2 2020-12-23 07:15:28
1469 2005-06-15 20:52:36.000 2451 2451 580 580 2005-06-21 19:55:36.000 1 1 2020-12-23 07:15:39
3571 2005-07-06 03:32:31.000 4166 4166 580 580 2005-07-11 06:15:31.000 1 1 2020-12-23 07:16:09
3867 2005-07-06 17:52:19.000 3620 3620 580 580 2005-07-13 21:48:19.000 1 1 2020-12-23 07:16:13
4169 2005-07-07 09:39:18.000 3360 3360 580 580 2005-07-11 13:43:18.000 1 1 2020-12-23 07:16:18
4590 2005-07-08 06:27:48.000 4233 4233 580 580 2005-07-14 07:46:48.000 1 1 2020-12-23 07:16:24
5937 2005-07-10 22:16:08.000 1579 1579 580 580 2005-07-16 03:08:08.000 2 2 2020-12-23 07:16:44
6089 2005-07-11 05:45:59.000 3298 3298 580 580 2005-07-17 11:04:59.000 2 2 2020-12-23 07:16:46
6170 2005-07-11 10:29:21.000 278 278 580 580 2005-07-16 05:13:21.000 2 2 2020-12-23 07:16:47
7620 2005-07-28 00:27:17.000 931 931 580 580 2005-07-31 02:04:17.000 1 1 2020-12-23 07:17:09
8784 2005-07-29 20:35:37.000 2308 2308 580 580 2005-07-30 17:22:37.000 1 1 2020-12-23 07:17:26
8839 2005-07-29 22:52:34.000 3440 3440 580 580 2005-08-05 03:24:34.000 2 2 2020-12-23 07:17:27
9199 2005-07-30 12:38:00.000 4336 4336 580 580 2005-08-01 07:09:00.000 1 1 2020-12-23 07:17:32
9239 2005-07-30 13:50:52.000 1728 1728 580 580 2005-08-06 16:28:52.000 1 1 2020-12-23 07:17:33
9460 2005-07-30 22:25:39.000 4463 4463 580 580 2005-08-08 20:56:39.000 2 2 2020-12-23 07:17:36
9604 2005-07-31 03:47:12.000 4342 4342 580 580 2005-08-03 06:48:12.000 1 1 2020-12-23 07:17:38
9865 2005-07-31 13:10:45.000 1355 1355 580 580 2005-08-02 09:19:45.000 2 2 2020-12-23 07:17:42
10723 2005-08-01 19:10:49.000 2526 2526 580 580 2005-08-08 19:21:49.000 2 2 2020-12-23 07:17:54
10965 2005-08-02 04:00:19.000 2192 2192 580 580 2005-08-09 03:27:19.000 1 1 2020-12-23 07:17:57
11164 2005-08-02 10:10:56.000 4450 4450 580 580 2005-08-10 11:20:56.000 2 2 2020-12-23 07:18:00
12670 2005-08-18 19:17:58.000 1716 1716 580 580 2005-08-23 20:54:58.000 2 2 2020-12-23 07:18:20
13313 2005-08-19 19:11:41.000 3709 3709 580 580 2005-08-21 23:53:41.000 2 2 2020-12-23 07:18:30
13742 2005-08-20 10:49:15.000 1377 1377 580 580 2005-08-21 11:05:15.000 2 2 2020-12-23 07:18:37
14818 2005-08-22 01:17:18.000 1619 1619 580 580 2005-08-26 05:40:18.000 1 1 2020-12-23 07:18:52
15157 2005-08-22 14:30:09.000 1909 1909 580 580 2005-08-29 18:28:09.000 1 1 2020-12-23 07:18:57
15630 2005-08-23 07:29:13.000 3590 3590 580 580 2005-08-31 04:33:13.000 2 2 2020-12-23 07:19:04
15947 2005-08-23 18:54:32.000 1877 1877 580 580 2005-08-24 22:39:32.000 2 2 2020-12-23 07:19:08

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