home / sakila

rental

28 rows where customer_id = 187

✎ 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
252 2005-05-26 14:39:53.000 1203 1203 187 187 2005-06-02 14:48:53.000 1 1 2020-12-23 07:15:23
1323 2005-06-15 10:55:17.000 3273 3273 187 187 2005-06-24 09:51:17.000 1 1 2020-12-23 07:15:37
1462 2005-06-15 20:37:40.000 653 653 187 187 2005-06-18 19:36:40.000 2 2 2020-12-23 07:15:39
1592 2005-06-16 05:14:37.000 3798 3798 187 187 2005-06-20 10:52:37.000 2 2 2020-12-23 07:15:41
2127 2005-06-17 20:54:48.000 3757 3757 187 187 2005-06-18 16:28:48.000 2 2 2020-12-23 07:15:49
2533 2005-06-19 01:34:26.000 4564 4564 187 187 2005-06-22 20:19:26.000 1 1 2020-12-23 07:15:54
2742 2005-06-19 16:05:47.000 4154 4154 187 187 2005-06-26 21:34:47.000 1 1 2020-12-23 07:15:57
3402 2005-06-21 15:54:37.000 596 596 187 187 2005-06-30 13:43:37.000 1 1 2020-12-23 07:16:06
3709 2005-07-06 10:26:56.000 4033 4033 187 187 2005-07-15 13:51:56.000 2 2 2020-12-23 07:16:11
4429 2005-07-07 22:32:47.000 2949 2949 187 187 2005-07-15 03:10:47.000 2 2 2020-12-23 07:16:22
5366 2005-07-09 18:28:37.000 886 886 187 187 2005-07-13 20:45:37.000 1 1 2020-12-23 07:16:36
5738 2005-07-10 11:50:51.000 200 200 187 187 2005-07-19 17:46:51.000 1 1 2020-12-23 07:16:41
5833 2005-07-10 16:39:24.000 3829 3829 187 187 2005-07-17 12:52:24.000 1 1 2020-12-23 07:16:43
6057 2005-07-11 04:03:40.000 1340 1340 187 187 2005-07-17 01:34:40.000 2 2 2020-12-23 07:16:46
6428 2005-07-12 00:01:51.000 4365 4365 187 187 2005-07-20 22:02:51.000 2 2 2020-12-23 07:16:51
7289 2005-07-27 12:26:51.000 2157 2157 187 187 2005-08-02 18:20:51.000 2 2 2020-12-23 07:17:04
7844 2005-07-28 09:16:19.000 4220 4220 187 187 2005-08-05 14:06:19.000 2 2 2020-12-23 07:17:12
7967 2005-07-28 13:56:51.000 2040 2040 187 187 2005-08-03 19:38:51.000 1 1 2020-12-23 07:17:14
9241 2005-07-30 13:58:41.000 4145 4145 187 187 2005-08-04 09:44:41.000 2 2 2020-12-23 07:17:33
11843 2005-08-17 13:14:50.000 3091 3091 187 187 2005-08-22 11:31:50.000 2 2 2020-12-23 07:18:09
12307 2005-08-18 05:48:23.000 2679 2679 187 187 2005-08-26 02:32:23.000 1 1 2020-12-23 07:18:15
12490 2005-08-18 12:48:45.000 1577 1577 187 187 2005-08-27 15:53:45.000 1 1 2020-12-23 07:18:18
12534 2005-08-18 14:04:41.000 995 995 187 187 2005-08-25 16:57:41.000 1 1 2020-12-23 07:18:18
13940 2005-08-20 17:28:57.000 2638 2638 187 187 2005-08-27 22:07:57.000 1 1 2020-12-23 07:18:40
14855 2005-08-22 02:27:32.000 1668 1668 187 187 2005-08-31 03:35:32.000 1 1 2020-12-23 07:18:53
15231 2005-08-22 17:32:57.000 2980 2980 187 187 2005-08-25 13:06:57.000 1 1 2020-12-23 07:18:58
15517 2005-08-23 03:13:01.000 2221 2221 187 187 2005-08-25 21:14:01.000 2 2 2020-12-23 07:19:02
15971 2005-08-23 19:59:33.000 3456 3456 187 187 2005-09-02 01:28:33.000 1 1 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 11.288ms