home / sakila

rental

24 rows where customer_id = 382

✎ 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
356 2005-05-27 06:32:30.000 2868 2868 382 382 2005-05-30 06:24:30.000 2 2 2020-12-23 07:15:24
522 2005-05-28 03:33:20.000 3195 3195 382 382 2005-05-31 04:23:20.000 1 1 2020-12-23 07:15:26
2389 2005-06-18 15:27:47.000 731 731 382 382 2005-06-21 12:26:47.000 1 1 2020-12-23 07:15:52
2468 2005-06-18 20:23:52.000 1833 1833 382 382 2005-06-23 14:34:52.000 1 1 2020-12-23 07:15:53
2489 2005-06-18 22:00:44.000 4012 4012 382 382 2005-06-22 02:06:44.000 2 2 2020-12-23 07:15:54
2514 2005-06-18 23:56:44.000 2559 2559 382 382 2005-06-23 21:10:44.000 1 1 2020-12-23 07:15:54
3125 2005-06-20 18:31:58.000 3293 3293 382 382 2005-06-21 15:03:58.000 1 1 2020-12-23 07:16:02
3480 2005-07-05 23:11:43.000 1488 1488 382 382 2005-07-12 02:01:43.000 2 2 2020-12-23 07:16:08
4351 2005-07-07 19:04:24.000 3567 3567 382 382 2005-07-14 00:03:24.000 2 2 2020-12-23 07:16:21
5004 2005-07-09 01:20:50.000 2637 2637 382 382 2005-07-09 19:56:50.000 1 1 2020-12-23 07:16:31
5816 2005-07-10 15:48:47.000 1746 1746 382 382 2005-07-13 11:51:47.000 2 2 2020-12-23 07:16:43
7625 2005-07-28 00:47:56.000 3129 3129 382 382 2005-08-02 23:34:56.000 1 1 2020-12-23 07:17:09
8777 2005-07-29 20:10:21.000 2462 2462 382 382 2005-07-30 20:32:21.000 2 2 2020-12-23 07:17:26
8871 2005-07-30 00:12:41.000 4535 4535 382 382 2005-08-08 03:53:41.000 1 1 2020-12-23 07:17:27
8993 2005-07-30 04:51:25.000 1891 1891 382 382 2005-08-01 01:04:25.000 1 1 2020-12-23 07:17:29
9067 2005-07-30 07:31:01.000 3628 3628 382 382 2005-08-04 11:44:01.000 2 2 2020-12-23 07:17:30
9555 2005-07-31 02:11:16.000 2108 2108 382 382 2005-08-03 06:58:16.000 2 2 2020-12-23 07:17:37
10327 2005-08-01 04:55:35.000 328 328 382 382 2005-08-07 08:17:35.000 2 2 2020-12-23 07:17:48
12229 2005-08-18 03:08:23.000 1123 1123 382 382 2005-08-22 03:42:23.000 1 1 2020-12-23 07:18:14
12529 2005-08-18 13:53:36.000 1956 1956 382 382 2005-08-19 18:20:36.000 2 2 2020-12-23 07:18:18
14009 2005-08-20 20:26:53.000 3004 3004 382 382 2005-08-21 23:32:53.000 2 2 2020-12-23 07:18:41
14300 2005-08-21 07:19:37.000 690 690 382 382 2005-08-25 12:06:37.000 2 2 2020-12-23 07:18:45
14354 2005-08-21 09:08:14.000 1137 1137 382 382 2005-08-30 05:27:14.000 1 1 2020-12-23 07:18:46
15939 2005-08-23 18:44:21.000 3209 3209 382 382 2005-09-01 17:25:21.000 2 2 2020-12-23 07:19:08

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