home / sakila

rental

26 rows where customer_id = 327

✎ 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
653 2005-05-28 20:12:20.000 126 126 327 327 2005-06-04 14:44:20.000 2 2 2020-12-23 07:15:28
1294 2005-06-15 09:09:27.000 339 339 327 327 2005-06-19 04:43:27.000 1 1 2020-12-23 07:15:37
1577 2005-06-16 04:03:28.000 367 367 327 327 2005-06-24 22:40:28.000 2 2 2020-12-23 07:15:40
1929 2005-06-17 06:49:30.000 573 573 327 327 2005-06-22 12:07:30.000 2 2 2020-12-23 07:15:46
2273 2005-06-18 06:30:02.000 4456 4456 327 327 2005-06-20 07:07:02.000 1 1 2020-12-23 07:15:51
2304 2005-06-18 08:30:15.000 3543 3543 327 327 2005-06-23 06:17:15.000 1 1 2020-12-23 07:15:51
2637 2005-06-19 09:20:56.000 2736 2736 327 327 2005-06-27 10:09:56.000 2 2 2020-12-23 07:15:56
4445 2005-07-07 23:08:22.000 3328 3328 327 327 2005-07-16 03:49:22.000 1 1 2020-12-23 07:16:22
4521 2005-07-08 02:57:56.000 2652 2652 327 327 2005-07-11 22:49:56.000 2 2 2020-12-23 07:16:23
6618 2005-07-12 08:41:42.000 4266 4266 327 327 2005-07-14 05:34:42.000 1 1 2020-12-23 07:16:54
7458 2005-07-27 18:36:17.000 2964 2964 327 327 2005-07-31 22:43:17.000 1 1 2020-12-23 07:17:07
7808 2005-07-28 07:58:56.000 4052 4052 327 327 2005-08-02 10:49:56.000 1 1 2020-12-23 07:17:12
10371 2005-08-01 06:20:29.000 923 923 327 327 2005-08-04 00:31:29.000 2 2 2020-12-23 07:17:49
11372 2005-08-02 18:10:50.000 796 796 327 327 2005-08-07 17:58:50.000 1 1 2020-12-23 07:18:03
11929 2005-08-17 16:28:51.000 3765 3765 327 327 2005-08-25 19:36:51.000 1 1 2020-12-23 07:18:10
12016 2005-08-17 19:33:24.000 2109 2109 327 327 2005-08-21 19:59:24.000 2 2 2020-12-23 07:18:12
13158 2005-08-19 13:18:10.000 944 944 327 327 2005-08-25 09:27:10.000 1 1 2020-12-23 07:18:28
13360 2005-08-19 21:05:11.000 3396 3396 327 327 2005-08-24 16:05:11.000 2 2 2020-12-23 07:18:31
13448 2005-08-20 00:12:43.000 2870 2870 327 327 2005-08-25 02:33:43.000 1 1 2020-12-23 07:18:32
14847 2005-08-22 02:13:51.000 2995 2995 327 327 2005-08-29 03:42:51.000 2 2 2020-12-23 07:18:52
15297 2006-02-14 15:16:03.000 3192 3192 327 327   2 2 2020-12-23 07:18:59
15365 2005-08-22 21:42:17.000 3382 3382 327 327 2005-09-01 03:14:17.000 2 2 2020-12-23 07:19:00
15386 2005-08-22 22:41:14.000 3056 3056 327 327 2005-08-29 22:29:14.000 1 1 2020-12-23 07:19:01
15828 2005-08-23 15:16:32.000 428 428 327 327 2005-08-29 12:20:32.000 1 1 2020-12-23 07:19:07
15916 2005-08-23 17:56:01.000 4580 4580 327 327 2005-08-31 21:49:01.000 2 2 2020-12-23 07:19:08
15969 2005-08-23 19:51:30.000 1807 1807 327 327 2005-08-31 23:50:30.000 1 1 2020-12-23 07:19:09

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