home / sakila

rental

26 rows where customer_id = 278

✎ 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
1092 2005-05-31 12:15:57.000 4412 4412 278 278 2005-06-03 15:39:57.000 2 2 2020-12-23 07:15:34
1387 2005-06-15 15:40:56.000 515 515 278 278 2005-06-17 10:39:56.000 1 1 2020-12-23 07:15:38
1978 2005-06-17 09:42:34.000 1590 1590 278 278 2005-06-20 09:13:34.000 2 2 2020-12-23 07:15:46
2078 2005-06-17 16:48:55.000 2021 2021 278 278 2005-06-19 18:01:55.000 1 1 2020-12-23 07:15:48
3453 2005-06-21 21:12:11.000 842 842 278 278 2005-06-23 17:39:11.000 2 2 2020-12-23 07:16:07
3776 2005-07-06 13:31:37.000 4387 4387 278 278 2005-07-10 10:53:37.000 2 2 2020-12-23 07:16:12
4430 2005-07-07 22:35:24.000 3436 3436 278 278 2005-07-14 23:49:24.000 1 1 2020-12-23 07:16:22
4866 2005-07-08 19:09:59.000 4036 4036 278 278 2005-07-15 00:51:59.000 2 2 2020-12-23 07:16:29
6869 2005-07-12 20:12:06.000 3546 3546 278 278 2005-07-13 18:37:06.000 1 1 2020-12-23 07:16:58
7239 2005-07-27 10:20:27.000 1786 1786 278 278 2005-07-29 10:15:27.000 1 1 2020-12-23 07:17:03
7834 2005-07-28 08:46:43.000 4124 4124 278 278 2005-07-31 07:09:43.000 2 2 2020-12-23 07:17:12
8222 2005-07-28 23:51:53.000 2999 2999 278 278 2005-08-05 22:48:53.000 1 1 2020-12-23 07:17:18
8953 2005-07-30 03:21:05.000 535 535 278 278 2005-08-02 05:24:05.000 2 2 2020-12-23 07:17:28
9448 2005-07-30 21:56:13.000 1213 1213 278 278 2005-08-04 18:03:13.000 1 1 2020-12-23 07:17:36
10649 2005-08-01 16:11:40.000 1032 1032 278 278 2005-08-06 14:09:40.000 2 2 2020-12-23 07:17:53
10731 2005-08-01 19:21:48.000 4248 4248 278 278 2005-08-08 22:01:48.000 2 2 2020-12-23 07:17:54
10849 2005-08-01 23:51:00.000 1683 1683 278 278 2005-08-10 19:59:00.000 2 2 2020-12-23 07:17:56
11095 2005-08-02 08:03:20.000 3517 3517 278 278 2005-08-10 05:20:20.000 1 1 2020-12-23 07:17:59
11531 2005-08-17 00:30:04.000 1817 1817 278 278 2005-08-20 01:12:04.000 2 2 2020-12-23 07:18:05
12787 2005-08-19 00:07:58.000 2023 2023 278 278 2005-08-24 00:42:58.000 2 2 2020-12-23 07:18:22
13896 2005-08-20 15:59:56.000 1338 1338 278 278 2005-08-21 20:14:56.000 2 2 2020-12-23 07:18:39
13976 2005-08-20 19:02:16.000 1785 1785 278 278 2005-08-25 17:58:16.000 2 2 2020-12-23 07:18:40
14268 2005-08-21 06:21:24.000 2442 2442 278 278 2005-08-23 05:39:24.000 2 2 2020-12-23 07:18:45
14803 2005-08-22 00:49:10.000 2525 2525 278 278 2005-08-22 23:44:10.000 2 2 2020-12-23 07:18:52
14986 2005-08-22 07:37:24.000 1493 1493 278 278 2005-08-23 04:22:24.000 2 2 2020-12-23 07:18:54
16019 2005-08-23 21:30:45.000 3093 3093 278 278 2005-08-27 23:45:45.000 2 2 2020-12-23 07:19:09

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