home / sakila

rental

34 rows where customer_id = 168

✎ 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
404 2005-05-27 13:31:51.000 1293 1293 168 168 2005-05-30 16:58:51.000 1 1 2020-12-23 07:15:25
488 2005-05-28 00:07:50.000 393 393 168 168 2005-06-03 22:30:50.000 2 2 2020-12-23 07:15:26
1222 2005-06-15 03:38:49.000 2799 2799 168 168 2005-06-17 22:30:49.000 1 1 2020-12-23 07:15:36
3530 2005-07-06 01:22:45.000 4542 4542 168 168 2005-07-10 03:23:45.000 1 1 2020-12-23 07:16:08
4308 2005-07-07 17:29:16.000 1482 1482 168 168 2005-07-11 21:47:16.000 1 1 2020-12-23 07:16:20
4363 2005-07-07 19:43:28.000 3202 3202 168 168 2005-07-13 00:15:28.000 2 2 2020-12-23 07:16:21
4953 2005-07-08 23:09:48.000 2460 2460 168 168 2005-07-11 02:08:48.000 2 2 2020-12-23 07:16:30
5459 2005-07-09 22:43:56.000 1847 1847 168 168 2005-07-12 18:05:56.000 1 1 2020-12-23 07:16:37
5907 2005-07-10 20:41:41.000 4432 4432 168 168 2005-07-15 21:18:41.000 2 2 2020-12-23 07:16:44
6334 2005-07-11 19:20:44.000 948 948 168 168 2005-07-19 18:49:44.000 2 2 2020-12-23 07:16:50
6444 2005-07-12 00:36:02.000 2214 2214 168 168 2005-07-18 05:53:02.000 1 1 2020-12-23 07:16:51
6809 2005-07-12 17:51:54.000 3455 3455 168 168 2005-07-17 15:10:54.000 1 1 2020-12-23 07:16:57
8352 2005-07-29 04:52:01.000 2710 2710 168 168 2005-08-06 07:39:01.000 2 2 2020-12-23 07:17:20
8527 2005-07-29 10:21:00.000 709 709 168 168 2005-08-05 16:05:00.000 2 2 2020-12-23 07:17:22
8659 2005-07-29 15:26:31.000 558 558 168 168 2005-08-06 19:05:31.000 2 2 2020-12-23 07:17:24
8883 2005-07-30 00:24:48.000 1421 1421 168 168 2005-08-04 00:24:48.000 2 2 2020-12-23 07:17:27
9197 2005-07-30 12:31:36.000 3214 3214 168 168 2005-08-03 09:05:36.000 1 1 2020-12-23 07:17:32
9418 2005-07-30 21:00:52.000 241 241 168 168 2005-08-08 15:56:52.000 2 2 2020-12-23 07:17:35
9857 2005-07-31 13:00:53.000 3316 3316 168 168 2005-08-09 15:56:53.000 1 1 2020-12-23 07:17:42
9899 2005-07-31 14:12:36.000 3352 3352 168 168 2005-08-08 08:59:36.000 1 1 2020-12-23 07:17:42
10270 2005-08-01 03:10:24.000 2025 2025 168 168 2005-08-07 03:04:24.000 2 2 2020-12-23 07:17:47
11551 2005-08-17 01:03:49.000 3356 3356 168 168 2005-08-18 22:31:49.000 1 1 2020-12-23 07:18:05
11627 2005-08-17 04:25:47.000 3945 3945 168 168 2005-08-26 02:54:47.000 2 2 2020-12-23 07:18:06
11631 2005-08-17 04:28:56.000 59 59 168 168 2005-08-24 00:42:56.000 2 2 2020-12-23 07:18:06
12545 2005-08-18 14:28:00.000 1988 1988 168 168 2005-08-26 14:10:00.000 1 1 2020-12-23 07:18:19
12781 2005-08-18 23:50:24.000 1187 1187 168 168 2005-08-21 02:31:24.000 1 1 2020-12-23 07:18:22
13018 2005-08-19 08:04:50.000 2122 2122 168 168 2005-08-26 11:46:50.000 1 1 2020-12-23 07:18:25
13532 2005-08-20 03:29:28.000 1433 1433 168 168 2005-08-23 22:53:28.000 2 2 2020-12-23 07:18:33
13811 2005-08-20 13:00:30.000 1235 1235 168 168 2005-08-24 10:18:30.000 1 1 2020-12-23 07:18:38
14090 2005-08-21 00:11:16.000 3254 3254 168 168 2005-08-23 19:48:16.000 2 2 2020-12-23 07:18:42
15033 2005-08-22 09:25:24.000 2431 2431 168 168 2005-08-28 09:56:24.000 2 2 2020-12-23 07:18:55
15165 2005-08-22 14:59:30.000 3664 3664 168 168 2005-08-29 15:46:30.000 2 2 2020-12-23 07:18:57
15683 2005-08-23 09:38:17.000 3787 3787 168 168 2005-08-30 12:31:17.000 2 2 2020-12-23 07:19:04
15894 2006-02-14 15:16:03.000 4416 4416 168 168   1 1 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 12.435ms