home / sakila

rental

27 rows where customer_id = 292

✎ 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
324 2005-05-27 01:00:04.000 3364 3364 292 292 2005-05-30 04:27:04.000 1 1 2020-12-23 07:15:24
1901 2005-06-17 04:35:19.000 2469 2469 292 292 2005-06-25 06:09:19.000 2 2 2020-12-23 07:15:45
2258 2005-06-18 05:30:36.000 4573 4573 292 292 2005-06-24 09:09:36.000 1 1 2020-12-23 07:15:51
2838 2005-06-19 22:06:06.000 143 143 292 292 2005-06-25 22:30:06.000 1 1 2020-12-23 07:15:59
3328 2005-06-21 09:08:44.000 2462 2462 292 292 2005-06-30 12:28:44.000 1 1 2020-12-23 07:16:05
3557 2005-07-06 02:48:39.000 3832 3832 292 292 2005-07-08 22:52:39.000 2 2 2020-12-23 07:16:09
4200 2005-07-07 11:15:11.000 1097 1097 292 292 2005-07-11 11:46:11.000 2 2 2020-12-23 07:16:19
5095 2005-07-09 06:08:22.000 2788 2788 292 292 2005-07-11 10:52:22.000 1 1 2020-12-23 07:16:32
5257 2005-07-09 13:56:43.000 286 286 292 292 2005-07-10 14:26:43.000 2 2 2020-12-23 07:16:34
5940 2005-07-10 22:31:01.000 3295 3295 292 292 2005-07-14 00:52:01.000 1 1 2020-12-23 07:16:44
6270 2005-07-11 15:59:10.000 2308 2308 292 292 2005-07-18 10:29:10.000 2 2 2020-12-23 07:16:49
6900 2005-07-12 21:45:25.000 129 129 292 292 2005-07-19 21:19:25.000 1 1 2020-12-23 07:16:58
7199 2005-07-27 08:53:23.000 3685 3685 292 292 2005-08-03 10:01:23.000 1 1 2020-12-23 07:17:03
7216 2005-07-27 09:27:45.000 1812 1812 292 292 2005-08-03 13:08:45.000 1 1 2020-12-23 07:17:03
7545 2005-07-27 21:48:03.000 2541 2541 292 292 2005-08-01 22:23:03.000 2 2 2020-12-23 07:17:08
7766 2005-07-28 06:41:57.000 2774 2774 292 292 2005-08-06 11:21:57.000 2 2 2020-12-23 07:17:11
8047 2005-07-28 16:49:43.000 2936 2936 292 292 2005-08-03 14:48:43.000 2 2 2020-12-23 07:17:15
8842 2005-07-29 23:03:40.000 4203 4203 292 292 2005-08-06 23:23:40.000 2 2 2020-12-23 07:17:27
8990 2005-07-30 04:41:42.000 1869 1869 292 292 2005-08-07 22:50:42.000 2 2 2020-12-23 07:17:29
9792 2005-07-31 10:43:41.000 3163 3163 292 292 2005-08-07 10:18:41.000 1 1 2020-12-23 07:17:41
9819 2005-07-31 11:39:13.000 1927 1927 292 292 2005-08-06 09:11:13.000 2 2 2020-12-23 07:17:41
11193 2005-08-02 11:31:33.000 2246 2246 292 292 2005-08-04 14:00:33.000 1 1 2020-12-23 07:18:00
12739 2005-08-18 22:15:18.000 4129 4129 292 292 2005-08-27 00:37:18.000 2 2 2020-12-23 07:18:21
13715 2005-08-20 09:43:06.000 1028 1028 292 292 2005-08-27 10:22:06.000 1 1 2020-12-23 07:18:36
14499 2005-08-21 14:11:19.000 4109 4109 292 292 2005-08-23 16:10:19.000 2 2 2020-12-23 07:18:48
14845 2005-08-22 02:12:44.000 69 69 292 292 2005-08-24 02:36:44.000 2 2 2020-12-23 07:18:52
15117 2005-08-22 12:38:20.000 2502 2502 292 292 2005-08-27 07:36:20.000 2 2 2020-12-23 07:18:56

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