home / sakila

rental

27 rows where customer_id = 200

✎ 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
270 2005-05-26 16:20:56.000 207 207 200 200 2005-06-03 12:40:56.000 2 2 2020-12-23 07:15:23
1296 2005-06-15 09:23:59.000 1760 1760 200 200 2005-06-19 03:44:59.000 2 2 2020-12-23 07:15:37
1309 2005-06-15 10:10:49.000 2356 2356 200 200 2005-06-16 12:44:49.000 1 1 2020-12-23 07:15:37
1899 2005-06-17 04:29:15.000 858 858 200 200 2005-06-26 08:39:15.000 1 1 2020-12-23 07:15:45
2227 2005-06-18 03:43:23.000 3623 3623 200 200 2005-06-19 05:55:23.000 2 2 2020-12-23 07:15:50
2667 2005-06-19 11:28:46.000 1028 1028 200 200 2005-06-27 11:48:46.000 2 2 2020-12-23 07:15:56
2717 2005-06-19 14:46:10.000 140 140 200 200 2005-06-22 20:17:10.000 1 1 2020-12-23 07:15:57
3190 2005-06-20 23:27:15.000 351 351 200 200 2005-06-28 01:22:15.000 2 2 2020-12-23 07:16:03
3580 2005-07-06 03:48:44.000 3837 3837 200 200 2005-07-13 01:15:44.000 2 2 2020-12-23 07:16:09
5110 2005-07-09 06:57:25.000 195 195 200 200 2005-07-12 05:39:25.000 2 2 2020-12-23 07:16:32
6123 2005-07-11 08:02:27.000 1354 1354 200 200 2005-07-15 08:58:27.000 2 2 2020-12-23 07:16:47
6167 2005-07-11 10:21:21.000 3255 3255 200 200 2005-07-14 15:38:21.000 1 1 2020-12-23 07:16:47
6181 2005-07-11 11:10:11.000 4398 4398 200 200 2005-07-15 09:33:11.000 1 1 2020-12-23 07:16:47
6947 2005-07-26 23:42:03.000 760 760 200 200 2005-08-02 05:06:03.000 2 2 2020-12-23 07:16:59
7574 2005-07-27 22:53:00.000 298 298 200 200 2005-07-29 18:39:00.000 2 2 2020-12-23 07:17:08
8368 2005-07-29 05:15:41.000 1410 1410 200 200 2005-08-07 01:35:41.000 1 1 2020-12-23 07:17:20
8462 2005-07-29 08:15:42.000 3633 3633 200 200 2005-08-04 03:57:42.000 1 1 2020-12-23 07:17:21
9527 2005-07-31 01:02:24.000 2539 2539 200 200 2005-08-09 02:08:24.000 2 2 2020-12-23 07:17:37
10685 2005-08-01 17:49:38.000 2029 2029 200 200 2005-08-07 21:04:38.000 2 2 2020-12-23 07:17:53
11356 2005-08-02 17:42:40.000 303 303 200 200 2005-08-11 23:29:40.000 1 1 2020-12-23 07:18:03
11866 2006-02-14 15:16:03.000 2758 2758 200 200   2 2 2020-12-23 07:18:10
13737 2005-08-20 10:41:50.000 4319 4319 200 200 2005-08-25 14:33:50.000 2 2 2020-12-23 07:18:36
14034 2005-08-20 21:31:52.000 3484 3484 200 200 2005-08-29 00:13:52.000 1 1 2020-12-23 07:18:41
14521 2005-08-21 15:01:32.000 1538 1538 200 200 2005-08-28 19:12:32.000 1 1 2020-12-23 07:18:48
15691 2005-08-23 09:53:54.000 784 784 200 200 2005-08-27 10:14:54.000 1 1 2020-12-23 07:19:05
15742 2005-08-23 12:11:37.000 1339 1339 200 200 2005-08-31 07:28:37.000 2 2 2020-12-23 07:19:05
15961 2005-08-23 19:35:42.000 4006 4006 200 200 2005-08-30 22:52:42.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.93ms