home / sakila

rental

42 rows where customer_id = 236

✎ 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
262 2005-05-26 15:46:56.000 4261 4261 236 236 2005-05-28 15:49:56.000 2 2 2020-12-23 07:15:23
344 2005-05-27 04:30:22.000 2327 2327 236 236 2005-05-29 10:13:22.000 2 2 2020-12-23 07:15:24
1032 2005-05-31 04:28:43.000 2937 2937 236 236 2005-06-02 02:00:43.000 2 2 2020-12-23 07:15:33
1262 2005-06-15 06:54:53.000 4495 4495 236 236 2005-06-22 08:09:53.000 2 2 2020-12-23 07:15:36
1308 2005-06-15 10:07:48.000 220 220 236 236 2005-06-24 15:24:48.000 1 1 2020-12-23 07:15:37
2139 2005-06-17 21:29:34.000 807 807 236 236 2005-06-26 21:05:34.000 1 1 2020-12-23 07:15:49
2311 2005-06-18 08:51:29.000 4506 4506 236 236 2005-06-25 07:51:29.000 1 1 2020-12-23 07:15:51
2630 2005-06-19 08:47:21.000 3904 3904 236 236 2005-06-25 09:31:21.000 1 1 2020-12-23 07:15:56
2840 2005-06-19 22:17:44.000 1102 1102 236 236 2005-06-26 00:36:44.000 2 2 2020-12-23 07:15:59
3353 2005-06-21 11:29:23.000 3984 3984 236 236 2005-06-27 15:06:23.000 1 1 2020-12-23 07:16:06
3460 2005-06-21 21:46:56.000 1765 1765 236 236 2005-06-29 20:08:56.000 1 1 2020-12-23 07:16:07
3645 2005-07-06 07:22:09.000 3390 3390 236 236 2005-07-10 11:45:09.000 1 1 2020-12-23 07:16:10
3857 2005-07-06 17:07:54.000 1135 1135 236 236 2005-07-07 13:28:54.000 1 1 2020-12-23 07:16:13
4749 2005-07-08 14:05:58.000 1190 1190 236 236 2005-07-10 18:35:58.000 2 2 2020-12-23 07:16:27
4959 2005-07-08 23:22:23.000 3898 3898 236 236 2005-07-10 03:17:23.000 2 2 2020-12-23 07:16:30
5404 2005-07-09 20:10:43.000 3685 3685 236 236 2005-07-13 15:16:43.000 1 1 2020-12-23 07:16:36
5545 2005-07-10 02:50:29.000 118 118 236 236 2005-07-16 02:11:29.000 1 1 2020-12-23 07:16:39
5938 2005-07-10 22:17:42.000 2834 2834 236 236 2005-07-16 22:38:42.000 2 2 2020-12-23 07:16:44
6049 2005-07-11 03:32:32.000 2582 2582 236 236 2005-07-15 06:57:32.000 2 2 2020-12-23 07:16:46
6281 2005-07-11 16:38:16.000 835 835 236 236 2005-07-13 10:57:16.000 2 2 2020-12-23 07:16:49
6303 2005-07-11 17:55:43.000 846 846 236 236 2005-07-13 12:50:43.000 1 1 2020-12-23 07:16:49
6996 2005-07-27 01:13:45.000 3237 3237 236 236 2005-07-28 20:43:45.000 1 1 2020-12-23 07:17:00
7047 2005-07-27 03:31:11.000 2866 2866 236 236 2005-08-03 23:40:11.000 1 1 2020-12-23 07:17:00
7253 2005-07-27 10:46:37.000 1950 1950 236 236 2005-07-28 11:18:37.000 1 1 2020-12-23 07:17:03
7780 2005-07-28 07:11:55.000 3069 3069 236 236 2005-08-06 05:41:55.000 1 1 2020-12-23 07:17:11
7792 2005-07-28 07:24:02.000 3736 3736 236 236 2005-08-04 11:13:02.000 1 1 2020-12-23 07:17:11
7798 2005-07-28 07:41:59.000 3281 3281 236 236 2005-07-31 12:36:59.000 1 1 2020-12-23 07:17:12
8657 2005-07-29 15:09:25.000 3194 3194 236 236 2005-07-31 19:10:25.000 1 1 2020-12-23 07:17:24
9011 2005-07-30 05:16:29.000 2799 2799 236 236 2005-08-05 06:57:29.000 1 1 2020-12-23 07:17:29
9934 2005-07-31 15:25:26.000 2492 2492 236 236 2005-08-05 17:13:26.000 1 1 2020-12-23 07:17:43
10137 2005-07-31 22:01:41.000 612 612 236 236 2005-08-07 22:24:41.000 1 1 2020-12-23 07:17:46
11139 2005-08-02 09:27:36.000 1011 1011 236 236 2005-08-08 14:07:36.000 2 2 2020-12-23 07:17:59
11486 2005-08-02 22:34:06.000 1610 1610 236 236 2005-08-09 00:46:06.000 2 2 2020-12-23 07:18:04
11507 2005-08-16 23:26:43.000 4197 4197 236 236 2005-08-24 22:48:43.000 2 2 2020-12-23 07:18:05
11895 2005-08-17 15:15:07.000 2156 2156 236 236 2005-08-18 11:00:07.000 2 2 2020-12-23 07:18:10
12975 2005-08-19 06:51:19.000 3300 3300 236 236 2005-08-25 04:22:19.000 1 1 2020-12-23 07:18:25
12988 2006-02-14 15:16:03.000 81 81 236 236   2 2 2020-12-23 07:18:25
13364 2005-08-19 21:09:30.000 2773 2773 236 236 2005-08-25 18:37:30.000 1 1 2020-12-23 07:18:31
13443 2005-08-19 23:53:42.000 3161 3161 236 236 2005-08-28 05:37:42.000 1 1 2020-12-23 07:18:32
14321 2005-08-21 08:05:12.000 967 967 236 236 2005-08-23 02:17:12.000 1 1 2020-12-23 07:18:45
14364 2005-08-21 09:25:11.000 3513 3513 236 236 2005-08-29 09:04:11.000 1 1 2020-12-23 07:18:46
14722 2005-08-21 21:50:53.000 2930 2930 236 236 2005-08-30 03:13:53.000 1 1 2020-12-23 07:18:51

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