home / sakila

rental

31 rows where customer_id = 323

✎ 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
58 2005-05-25 08:53:14.000 3050 3050 323 323 2005-05-28 14:40:14.000 1 1 2020-12-23 07:15:20
729 2005-05-29 06:35:13.000 1688 1688 323 323 2005-06-04 03:23:13.000 2 2 2020-12-23 07:15:29
878 2005-05-30 05:49:13.000 4265 4265 323 323 2005-06-07 04:35:13.000 1 1 2020-12-23 07:15:31
1167 2005-06-14 23:25:58.000 4021 4021 323 323 2005-06-18 05:18:58.000 2 2 2020-12-23 07:15:35
1786 2005-06-16 19:30:54.000 263 263 323 323 2005-06-19 14:24:54.000 1 1 2020-12-23 07:15:44
2933 2005-06-20 04:52:23.000 4483 4483 323 323 2005-06-26 07:12:23.000 2 2 2020-12-23 07:16:00
3704 2005-07-06 10:16:45.000 2687 2687 323 323 2005-07-13 12:44:45.000 2 2 2020-12-23 07:16:11
4572 2005-07-08 05:36:59.000 1324 1324 323 323 2005-07-12 04:46:59.000 2 2 2020-12-23 07:16:24
5669 2005-07-10 08:12:53.000 1173 1173 323 323 2005-07-11 05:48:53.000 2 2 2020-12-23 07:16:40
5906 2005-07-10 20:41:41.000 514 514 323 323 2005-07-14 00:12:41.000 2 2 2020-12-23 07:16:44
6840 2005-07-12 19:03:22.000 1381 1381 323 323 2005-07-21 18:34:22.000 2 2 2020-12-23 07:16:57
7146 2005-07-27 07:02:30.000 2245 2245 323 323 2005-08-05 10:29:30.000 1 1 2020-12-23 07:17:02
7275 2005-07-27 11:39:08.000 775 775 323 323 2005-07-30 13:37:08.000 2 2 2020-12-23 07:17:04
7695 2005-07-28 03:41:13.000 2742 2742 323 323 2005-08-06 05:06:13.000 2 2 2020-12-23 07:17:10
7847 2005-07-28 09:23:14.000 3602 3602 323 323 2005-08-02 11:02:14.000 2 2 2020-12-23 07:17:12
7937 2005-07-28 12:38:22.000 3944 3944 323 323 2005-07-29 09:19:22.000 1 1 2020-12-23 07:17:13
8474 2005-07-29 08:36:56.000 4346 4346 323 323 2005-08-01 03:07:56.000 1 1 2020-12-23 07:17:22
8790 2005-07-29 20:51:41.000 751 751 323 323 2005-07-30 17:30:41.000 2 2 2020-12-23 07:17:26
9363 2005-07-30 18:44:23.000 873 873 323 323 2005-08-04 15:03:23.000 1 1 2020-12-23 07:17:35
10002 2005-07-31 17:48:16.000 1002 1002 323 323 2005-08-06 16:15:16.000 1 1 2020-12-23 07:17:44
10028 2005-07-31 18:35:54.000 2305 2305 323 323 2005-08-01 13:01:54.000 2 2 2020-12-23 07:17:44
10298 2005-08-01 04:06:03.000 1383 1383 323 323 2005-08-05 05:59:03.000 2 2 2020-12-23 07:17:48
10994 2005-08-02 04:46:53.000 647 647 323 323 2005-08-11 10:30:53.000 1 1 2020-12-23 07:17:57
11548 2005-08-17 00:59:47.000 480 480 323 323 2005-08-22 05:09:47.000 1 1 2020-12-23 07:18:05
12120 2005-08-17 23:16:46.000 2912 2912 323 323 2005-08-19 00:11:46.000 2 2 2020-12-23 07:18:13
12169 2005-08-18 01:05:54.000 2281 2281 323 323 2005-08-24 02:16:54.000 2 2 2020-12-23 07:18:14
13140 2005-08-19 12:35:56.000 4210 4210 323 323 2005-08-27 18:24:56.000 2 2 2020-12-23 07:18:27
14224 2005-08-21 04:53:08.000 3634 3634 323 323 2005-08-27 04:12:08.000 2 2 2020-12-23 07:18:44
14957 2005-08-22 06:29:34.000 1384 1384 323 323 2005-08-26 04:52:34.000 2 2 2020-12-23 07:18:54
15387 2005-08-22 22:49:13.000 3879 3879 323 323 2005-08-29 01:49:13.000 2 2 2020-12-23 07:19:01
15728 2005-08-23 11:30:32.000 2567 2567 323 323 2005-08-28 09:52:32.000 2 2 2020-12-23 07:19:05

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