home / sakila

rental

23 rows where customer_id = 134

✎ 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
366 2005-05-27 07:33:54.000 360 360 134 134 2005-06-04 01:55:54.000 2 2 2020-12-23 07:15:24
798 2005-05-29 17:23:43.000 1102 1102 134 134 2005-06-01 13:06:43.000 2 2 2020-12-23 07:15:30
814 2005-05-29 20:16:12.000 1572 1572 134 134 2005-06-07 17:47:12.000 1 1 2020-12-23 07:15:30
1124 2005-05-31 16:49:34.000 4560 4560 134 134 2005-06-04 19:32:34.000 2 2 2020-12-23 07:15:35
1618 2005-06-16 07:08:38.000 3741 3741 134 134 2005-06-25 05:26:38.000 2 2 2020-12-23 07:15:41
1784 2005-06-16 19:25:32.000 3792 3792 134 134 2005-06-20 00:00:32.000 2 2 2020-12-23 07:15:44
1881 2005-06-17 03:09:56.000 159 159 134 134 2005-06-18 01:49:56.000 1 1 2020-12-23 07:15:45
3267 2005-06-21 04:55:21.000 1118 1118 134 134 2005-06-29 23:46:21.000 1 1 2020-12-23 07:16:04
5315 2005-07-09 16:09:19.000 585 585 134 134 2005-07-14 21:10:19.000 1 1 2020-12-23 07:16:35
6226 2005-07-11 13:48:11.000 2758 2758 134 134 2005-07-15 17:18:11.000 2 2 2020-12-23 07:16:48
6659 2005-07-12 11:18:05.000 2285 2285 134 134 2005-07-16 16:45:05.000 2 2 2020-12-23 07:16:55
7516 2005-07-27 20:55:28.000 2178 2178 134 134 2005-07-30 00:50:28.000 1 1 2020-12-23 07:17:07
7965 2005-07-28 13:52:57.000 3671 3671 134 134 2005-07-29 14:54:57.000 1 1 2020-12-23 07:17:14
8650 2005-07-29 14:59:04.000 1272 1272 134 134 2005-08-04 13:13:04.000 2 2 2020-12-23 07:17:24
10864 2005-08-02 00:18:59.000 1694 1694 134 134 2005-08-08 22:20:59.000 1 1 2020-12-23 07:17:56
11280 2005-08-02 14:34:33.000 1846 1846 134 134 2005-08-08 15:40:33.000 2 2 2020-12-23 07:18:01
11283 2005-08-02 14:39:46.000 312 312 134 134 2005-08-05 10:19:46.000 2 2 2020-12-23 07:18:01
11482 2005-08-02 22:24:31.000 1400 1400 134 134 2005-08-04 01:48:31.000 1 1 2020-12-23 07:18:04
12754 2005-08-18 22:37:41.000 4154 4154 134 134 2005-08-27 20:17:41.000 2 2 2020-12-23 07:18:21
12987 2005-08-19 07:11:44.000 3665 3665 134 134 2005-08-20 04:17:44.000 1 1 2020-12-23 07:18:25
13006 2005-08-19 07:47:16.000 3157 3157 134 134 2005-08-21 06:17:16.000 1 1 2020-12-23 07:18:25
14265 2005-08-21 06:20:14.000 3116 3116 134 134 2005-08-23 09:05:14.000 1 1 2020-12-23 07:18:45
15963 2005-08-23 19:42:46.000 3819 3819 134 134 2005-08-25 22:12:46.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.363ms