home / sakila

rental

25 rows where customer_id = 60

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: rental_date, 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
318 2005-05-26 23:37:39.000 2559 2559 60 60 2005-06-03 04:31:39.000 2 2 2020-12-23 07:15:24
706 2005-05-29 03:05:49.000 2278 2278 60 60 2005-06-04 22:48:49.000 1 1 2020-12-23 07:15:29
934 2005-05-30 13:24:46.000 3595 3595 60 60 2005-06-08 16:44:46.000 2 2 2020-12-23 07:15:32
1482 2005-06-15 21:18:16.000 3980 3980 60 60 2005-06-16 17:07:16.000 1 1 2020-12-23 07:15:39
2394 2005-06-18 15:42:30.000 2669 2669 60 60 2005-06-26 16:12:30.000 1 1 2020-12-23 07:15:52
3473 2005-07-05 22:57:34.000 2735 2735 60 60 2005-07-12 23:53:34.000 1 1 2020-12-23 07:16:07
3849 2005-07-06 16:49:43.000 3660 3660 60 60 2005-07-12 17:20:43.000 1 1 2020-12-23 07:16:13
6282 2005-07-11 16:46:22.000 4453 4453 60 60 2005-07-15 13:19:22.000 1 1 2020-12-23 07:16:49
7067 2005-07-27 03:55:10.000 870 870 60 60 2005-08-01 02:56:10.000 1 1 2020-12-23 07:17:01
7331 2005-07-27 13:57:50.000 2090 2090 60 60 2005-07-31 08:59:50.000 1 1 2020-12-23 07:17:05
7494 2005-07-27 19:56:31.000 2259 2259 60 60 2005-07-30 14:28:31.000 1 1 2020-12-23 07:17:07
9356 2005-07-30 18:36:24.000 4188 4188 60 60 2005-08-03 14:10:24.000 1 1 2020-12-23 07:17:34
9761 2005-07-31 09:31:54.000 3778 3778 60 60 2005-08-03 11:02:54.000 2 2 2020-12-23 07:17:40
10680 2005-08-01 17:28:05.000 2498 2498 60 60 2005-08-04 19:34:05.000 1 1 2020-12-23 07:17:53
11092 2005-08-02 07:58:50.000 569 569 60 60 2005-08-04 03:23:50.000 2 2 2020-12-23 07:17:59
11404 2005-08-02 19:12:40.000 3285 3285 60 60 2005-08-11 22:38:40.000 2 2 2020-12-23 07:18:03
12084 2005-08-17 22:16:49.000 2706 2706 60 60 2005-08-24 17:42:49.000 2 2 2020-12-23 07:18:12
12489 2006-02-14 15:16:03.000 387 387 60 60   2 2 2020-12-23 07:18:18
12614 2005-08-18 17:16:03.000 2233 2233 60 60 2005-08-26 16:56:03.000 2 2 2020-12-23 07:18:19
14741 2006-02-14 15:16:03.000 612 612 60 60   2 2 2020-12-23 07:18:51
15093 2005-08-22 11:39:03.000 3534 3534 60 60 2005-08-23 06:16:03.000 2 2 2020-12-23 07:18:56
15318 2005-08-22 20:15:16.000 1738 1738 60 60 2005-08-25 14:17:16.000 1 1 2020-12-23 07:19:00
15618 2005-08-23 07:07:58.000 1903 1903 60 60 2005-08-29 03:48:58.000 1 1 2020-12-23 07:19:04
15632 2005-08-23 07:30:26.000 2941 2941 60 60 2005-08-24 07:53:26.000 2 2 2020-12-23 07:19:04
15649 2005-08-23 08:28:03.000 415 415 60 60 2005-08-30 05:11:03.000 1 1 2020-12-23 07:19:04

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