home / sakila

rental

23 rows where customer_id = 192

✎ 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
895 2005-05-30 08:50:43.000 2744 2744 192 192 2005-06-05 10:58:43.000 1 1 2020-12-23 07:15:32
2760 2005-06-19 17:16:33.000 2602 2602 192 192 2005-06-26 14:58:33.000 1 1 2020-12-23 07:15:58
3902 2005-07-06 19:25:18.000 2868 2868 192 192 2005-07-10 17:42:18.000 2 2 2020-12-23 07:16:14
4469 2005-07-08 00:18:32.000 2173 2173 192 192 2005-07-12 21:17:32.000 2 2 2020-12-23 07:16:23
5400 2005-07-09 19:56:40.000 3435 3435 192 192 2005-07-14 20:43:40.000 2 2 2020-12-23 07:16:36
6223 2005-07-11 13:27:09.000 3754 3754 192 192 2005-07-12 14:02:09.000 1 1 2020-12-23 07:16:48
6691 2005-07-12 12:26:38.000 403 403 192 192 2005-07-18 13:26:38.000 2 2 2020-12-23 07:16:55
7147 2005-07-27 07:02:34.000 990 990 192 192 2005-08-01 02:16:34.000 1 1 2020-12-23 07:17:02
8051 2005-07-28 16:56:16.000 4405 4405 192 192 2005-07-29 22:48:16.000 1 1 2020-12-23 07:17:15
8292 2005-07-29 02:29:36.000 4003 4003 192 192 2005-08-07 08:06:36.000 1 1 2020-12-23 07:17:19
9462 2005-07-30 22:30:44.000 4090 4090 192 192 2005-08-09 03:54:44.000 2 2 2020-12-23 07:17:36
9831 2005-07-31 11:59:32.000 1961 1961 192 192 2005-08-04 07:14:32.000 1 1 2020-12-23 07:17:41
10238 2005-08-01 02:08:05.000 561 561 192 192 2005-08-02 01:52:05.000 1 1 2020-12-23 07:17:47
10843 2005-08-01 23:43:03.000 1286 1286 192 192 2005-08-09 23:49:03.000 2 2 2020-12-23 07:17:56
11385 2005-08-02 18:23:11.000 2478 2478 192 192 2005-08-06 12:37:11.000 1 1 2020-12-23 07:18:03
11611 2006-02-14 15:16:03.000 1857 1857 192 192   2 2 2020-12-23 07:18:06
11815 2005-08-17 12:13:26.000 272 272 192 192 2005-08-22 17:15:26.000 2 2 2020-12-23 07:18:09
13125 2005-08-19 11:57:49.000 3722 3722 192 192 2005-08-26 07:53:49.000 1 1 2020-12-23 07:18:27
14146 2005-08-21 02:13:31.000 2151 2151 192 192 2005-08-24 22:47:31.000 2 2 2020-12-23 07:18:43
14238 2005-08-21 05:16:40.000 3148 3148 192 192 2005-08-30 02:13:40.000 2 2 2020-12-23 07:18:44
14404 2005-08-21 10:43:04.000 3660 3660 192 192 2005-08-30 10:00:04.000 1 1 2020-12-23 07:18:46
14692 2005-08-21 20:43:21.000 1908 1908 192 192 2005-08-28 19:02:21.000 1 1 2020-12-23 07:18:50
15855 2005-08-23 15:59:01.000 2528 2528 192 192 2005-08-29 20:26:01.000 1 1 2020-12-23 07:19:07

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