home / sakila

rental

35 rows where customer_id = 368

✎ 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
64 2005-05-25 09:21:29.000 79 79 368 368 2005-06-03 11:31:29.000 1 1 2020-12-23 07:15:21
125 2005-05-25 20:48:50.000 952 952 368 368 2005-06-02 21:39:50.000 1 1 2020-12-23 07:15:21
836 2005-05-29 23:56:42.000 3140 3140 368 368 2005-05-31 04:11:42.000 2 2 2020-12-23 07:15:31
949 2005-05-30 15:50:39.000 2202 2202 368 368 2005-06-03 14:25:39.000 1 1 2020-12-23 07:15:32
1186 2005-06-15 00:56:45.000 1556 1556 368 368 2005-06-16 02:23:45.000 1 1 2020-12-23 07:15:35
1513 2005-06-15 22:53:30.000 1173 1173 368 368 2005-06-23 01:00:30.000 1 1 2020-12-23 07:15:40
2531 2005-06-19 01:20:49.000 768 768 368 368 2005-06-22 01:50:49.000 2 2 2020-12-23 07:15:54
2694 2005-06-19 13:17:21.000 380 380 368 368 2005-06-24 15:09:21.000 1 1 2020-12-23 07:15:57
2744 2005-06-19 16:20:40.000 4511 4511 368 368 2005-06-22 11:44:40.000 2 2 2020-12-23 07:15:57
3275 2005-06-21 05:33:04.000 2320 2320 368 368 2005-06-30 00:37:04.000 2 2 2020-12-23 07:16:05
3608 2005-07-06 05:35:39.000 3095 3095 368 368 2005-07-10 07:46:39.000 2 2 2020-12-23 07:16:10
4066 2005-07-07 04:34:09.000 1975 1975 368 368 2005-07-10 23:54:09.000 1 1 2020-12-23 07:16:17
4584 2005-07-08 06:11:02.000 2322 2322 368 368 2005-07-11 05:14:02.000 1 1 2020-12-23 07:16:24
4913 2005-07-08 21:27:48.000 982 982 368 368 2005-07-18 02:51:48.000 1 1 2020-12-23 07:16:29
6124 2005-07-11 08:02:32.000 2022 2022 368 368 2005-07-12 05:58:32.000 2 2 2020-12-23 07:16:47
6154 2005-07-11 09:32:19.000 2717 2717 368 368 2005-07-16 15:10:19.000 1 1 2020-12-23 07:16:47
6681 2005-07-12 12:04:12.000 854 854 368 368 2005-07-19 11:01:12.000 2 2 2020-12-23 07:16:55
7571 2005-07-27 22:43:42.000 3850 3850 368 368 2005-07-30 22:17:42.000 1 1 2020-12-23 07:17:08
8045 2005-07-28 16:49:38.000 3427 3427 368 368 2005-08-03 15:42:38.000 1 1 2020-12-23 07:17:15
8226 2005-07-29 00:01:04.000 3541 3541 368 368 2005-08-01 19:08:04.000 2 2 2020-12-23 07:17:18
9400 2005-07-30 20:15:58.000 3910 3910 368 368 2005-08-03 21:21:58.000 1 1 2020-12-23 07:17:35
9833 2005-07-31 12:05:01.000 4243 4243 368 368 2005-08-09 09:25:01.000 2 2 2020-12-23 07:17:41
10730 2005-08-01 19:21:42.000 1793 1793 368 368 2005-08-10 21:18:42.000 1 1 2020-12-23 07:17:54
10848 2005-08-01 23:50:22.000 2630 2630 368 368 2005-08-06 00:52:22.000 1 1 2020-12-23 07:17:56
11844 2005-08-17 13:16:04.000 3791 3791 368 368 2005-08-18 10:16:04.000 1 1 2020-12-23 07:18:09
12319 2005-08-18 06:26:45.000 999 999 368 368 2005-08-23 01:35:45.000 1 1 2020-12-23 07:18:16
12796 2005-08-19 00:22:24.000 1285 1285 368 368 2005-08-19 22:53:24.000 2 2 2020-12-23 07:18:22
13189 2005-08-19 14:27:16.000 3444 3444 368 368 2005-08-28 10:34:16.000 1 1 2020-12-23 07:18:28
13280 2005-08-19 18:02:51.000 218 218 368 368 2005-08-21 23:17:51.000 2 2 2020-12-23 07:18:29
13378 2005-08-19 21:33:35.000 2708 2708 368 368 2005-08-20 22:47:35.000 1 1 2020-12-23 07:18:31
13781 2005-08-20 12:06:45.000 971 971 368 368 2005-08-26 06:50:45.000 2 2 2020-12-23 07:18:37
13963 2005-08-20 18:20:18.000 4145 4145 368 368 2005-08-24 21:26:18.000 1 1 2020-12-23 07:18:40
14393 2005-08-21 10:22:51.000 3937 3937 368 368 2005-08-29 08:28:51.000 1 1 2020-12-23 07:18:46
15353 2005-08-22 21:18:08.000 3470 3470 368 368 2005-08-25 20:29:08.000 2 2 2020-12-23 07:19:00
15437 2005-08-23 00:31:09.000 4236 4236 368 368 2005-08-30 06:17:09.000 2 2 2020-12-23 07:19:01

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