home / sakila

rental

34 rows where customer_id = 241

✎ 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
627 2005-05-28 17:04:43.000 425 425 241 241 2005-06-04 19:58:43.000 2 2 2020-12-23 07:15:28
1059 2005-05-31 08:20:43.000 3041 3041 241 241 2005-06-04 09:05:43.000 2 2 2020-12-23 07:15:34
2428 2005-06-18 17:47:34.000 3892 3892 241 241 2005-06-19 14:39:34.000 2 2 2020-12-23 07:15:53
2455 2005-06-18 19:33:06.000 870 870 241 241 2005-06-21 15:21:06.000 1 1 2020-12-23 07:15:53
2478 2005-06-18 21:01:21.000 2798 2798 241 241 2005-06-24 00:20:21.000 1 1 2020-12-23 07:15:54
2683 2005-06-19 12:27:19.000 2860 2860 241 241 2005-06-21 16:26:19.000 2 2 2020-12-23 07:15:56
3258 2005-06-21 03:53:58.000 4417 4417 241 241 2005-06-22 22:49:58.000 2 2 2020-12-23 07:16:04
3822 2005-07-06 15:41:15.000 1314 1314 241 241 2005-07-07 16:41:15.000 1 1 2020-12-23 07:16:13
4731 2005-07-08 13:08:18.000 4124 4124 241 241 2005-07-09 13:16:18.000 2 2 2020-12-23 07:16:27
5017 2005-07-09 02:00:16.000 3745 3745 241 241 2005-07-14 06:28:16.000 1 1 2020-12-23 07:16:31
5211 2005-07-09 11:26:50.000 2216 2216 241 241 2005-07-16 15:30:50.000 1 1 2020-12-23 07:16:34
5438 2005-07-09 21:34:32.000 487 487 241 241 2005-07-16 02:21:32.000 2 2 2020-12-23 07:16:37
5525 2005-07-10 02:03:08.000 3141 3141 241 241 2005-07-18 07:32:08.000 1 1 2020-12-23 07:16:38
5981 2005-07-11 00:19:04.000 2151 2151 241 241 2005-07-13 19:10:04.000 1 1 2020-12-23 07:16:45
6090 2005-07-11 05:47:08.000 71 71 241 241 2005-07-20 07:52:08.000 2 2 2020-12-23 07:16:46
6245 2005-07-11 14:56:57.000 512 512 241 241 2005-07-16 14:35:57.000 1 1 2020-12-23 07:16:48
7320 2005-07-27 13:33:35.000 4348 4348 241 241 2005-07-31 13:22:35.000 2 2 2020-12-23 07:17:04
7434 2005-07-27 17:34:40.000 2927 2927 241 241 2005-07-29 15:01:40.000 1 1 2020-12-23 07:17:06
7860 2005-07-28 09:58:02.000 2400 2400 241 241 2005-08-05 06:04:02.000 1 1 2020-12-23 07:17:12
9500 2005-07-30 23:58:36.000 2808 2808 241 241 2005-08-07 21:08:36.000 2 2 2020-12-23 07:17:36
9528 2005-07-31 01:05:04.000 193 193 241 241 2005-08-07 01:16:04.000 1 1 2020-12-23 07:17:37
9944 2005-07-31 15:44:43.000 2540 2540 241 241 2005-08-08 10:30:43.000 1 1 2020-12-23 07:17:43
10447 2005-08-01 09:04:58.000 1198 1198 241 241 2005-08-08 06:24:58.000 1 1 2020-12-23 07:17:50
10652 2005-08-01 16:24:08.000 1633 1633 241 241 2005-08-03 16:00:08.000 2 2 2020-12-23 07:17:53
11423 2005-08-02 19:57:13.000 3431 3431 241 241 2005-08-06 00:54:13.000 2 2 2020-12-23 07:18:04
12418 2005-08-18 09:59:36.000 4186 4186 241 241 2005-08-19 11:35:36.000 2 2 2020-12-23 07:18:17
12956 2005-08-19 06:06:26.000 3613 3613 241 241 2005-08-28 08:37:26.000 2 2 2020-12-23 07:18:24
13077 2005-08-19 10:15:19.000 433 433 241 241 2005-08-21 06:51:19.000 2 2 2020-12-23 07:18:26
14269 2005-08-21 06:22:07.000 531 531 241 241 2005-08-30 00:41:07.000 2 2 2020-12-23 07:18:45
14485 2005-08-21 13:52:07.000 1637 1637 241 241 2005-08-30 13:06:07.000 2 2 2020-12-23 07:18:48
14936 2005-08-22 05:51:26.000 3710 3710 241 241 2005-08-29 10:21:26.000 2 2 2020-12-23 07:18:54
15137 2005-08-22 13:20:28.000 856 856 241 241 2005-08-26 09:35:28.000 1 1 2020-12-23 07:18:57
15429 2005-08-23 00:20:31.000 740 740 241 241 2005-08-23 20:22:31.000 1 1 2020-12-23 07:19:01
15767 2005-08-23 13:14:15.000 3492 3492 241 241 2005-08-27 14:43:15.000 2 2 2020-12-23 07:19:06

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