home / sakila

rental

34 rows where customer_id = 211

✎ 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
238 2005-05-26 12:30:22.000 503 503 211 211 2005-05-27 06:49:22.000 1 1 2020-12-23 07:15:23
2812 2005-06-19 19:58:16.000 3016 3016 211 211 2005-06-26 15:26:16.000 1 1 2020-12-23 07:15:58
3437 2005-06-21 19:20:17.000 1798 1798 211 211 2005-07-01 01:09:17.000 2 2 2020-12-23 07:16:07
3937 2005-07-06 21:15:38.000 2091 2091 211 211 2005-07-15 00:01:38.000 2 2 2020-12-23 07:16:15
4060 2005-07-07 04:10:13.000 2697 2697 211 211 2005-07-13 07:44:13.000 1 1 2020-12-23 07:16:16
4441 2005-07-07 23:04:23.000 3680 3680 211 211 2005-07-13 19:07:23.000 1 1 2020-12-23 07:16:22
4479 2005-07-08 00:52:35.000 3516 3516 211 211 2005-07-09 20:19:35.000 2 2 2020-12-23 07:16:23
4857 2005-07-08 18:52:07.000 2069 2069 211 211 2005-07-11 22:06:07.000 1 1 2020-12-23 07:16:28
5668 2005-07-10 08:11:05.000 309 309 211 211 2005-07-16 13:15:05.000 1 1 2020-12-23 07:16:40
5699 2005-07-10 09:48:04.000 958 958 211 211 2005-07-17 09:07:04.000 1 1 2020-12-23 07:16:41
5785 2005-07-10 14:06:03.000 142 142 211 211 2005-07-17 17:59:03.000 2 2 2020-12-23 07:16:42
6438 2005-07-12 00:23:01.000 412 412 211 211 2005-07-17 22:45:01.000 1 1 2020-12-23 07:16:51
6628 2005-07-12 09:18:08.000 2894 2894 211 211 2005-07-21 04:27:08.000 2 2 2020-12-23 07:16:54
6722 2005-07-12 13:44:03.000 3124 3124 211 211 2005-07-19 12:43:03.000 2 2 2020-12-23 07:16:55
7484 2005-07-27 19:28:17.000 2746 2746 211 211 2005-07-31 20:05:17.000 2 2 2020-12-23 07:17:07
7975 2005-07-28 14:12:47.000 2565 2565 211 211 2005-08-05 09:18:47.000 1 1 2020-12-23 07:17:14
8961 2005-07-30 03:43:35.000 3679 3679 211 211 2005-08-06 07:42:35.000 1 1 2020-12-23 07:17:29
9111 2005-07-30 09:05:44.000 166 166 211 211 2005-08-04 14:27:44.000 2 2 2020-12-23 07:17:31
9953 2005-07-31 15:56:35.000 1646 1646 211 211 2005-08-02 12:01:35.000 2 2 2020-12-23 07:17:43
10445 2005-08-01 09:02:15.000 3582 3582 211 211 2005-08-08 10:26:15.000 2 2 2020-12-23 07:17:50
10928 2005-08-02 02:34:12.000 2885 2885 211 211 2005-08-07 21:13:12.000 1 1 2020-12-23 07:17:57
11076 2005-08-02 07:24:47.000 837 837 211 211 2005-08-10 09:16:47.000 1 1 2020-12-23 07:17:59
11963 2005-08-17 17:35:47.000 232 232 211 211 2005-08-23 16:19:47.000 2 2 2020-12-23 07:18:11
12311 2005-08-18 06:07:00.000 1650 1650 211 211 2005-08-21 07:54:00.000 2 2 2020-12-23 07:18:15
12565 2005-08-18 15:12:17.000 1284 1284 211 211 2005-08-19 12:26:17.000 2 2 2020-12-23 07:18:19
12570 2005-08-18 15:23:31.000 3973 3973 211 211 2005-08-22 09:59:31.000 2 2 2020-12-23 07:18:19
12746 2006-02-14 15:16:03.000 1012 1012 211 211   1 1 2020-12-23 07:18:21
13942 2005-08-20 17:30:52.000 4403 4403 211 211 2005-08-25 13:46:52.000 2 2 2020-12-23 07:18:40
13979 2005-08-20 19:03:49.000 2998 2998 211 211 2005-08-24 21:23:49.000 1 1 2020-12-23 07:18:40
14782 2005-08-22 00:17:20.000 1727 1727 211 211 2005-08-23 01:24:20.000 1 1 2020-12-23 07:18:52
14812 2005-08-22 01:10:32.000 4282 4282 211 211 2005-08-26 05:21:32.000 1 1 2020-12-23 07:18:52
15404 2005-08-22 23:19:44.000 3557 3557 211 211 2005-08-30 19:58:44.000 2 2 2020-12-23 07:19:01
15538 2005-08-23 04:07:37.000 4226 4226 211 211 2005-08-28 07:37:37.000 1 1 2020-12-23 07:19:03
15670 2005-08-23 09:07:11.000 2834 2834 211 211 2005-08-31 04:32:11.000 2 2 2020-12-23 07:19:04

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 14.937ms