home / sakila

rental

25 rows where customer_id = 508

✎ 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
369 2005-05-27 07:46:49.000 944 944 508 508 2005-06-01 06:20:49.000 2 2 2020-12-23 07:15:24
921 2005-05-30 11:53:09.000 1827 1827 508 508 2005-06-03 10:00:09.000 2 2 2020-12-23 07:15:32
1661 2005-06-16 10:12:57.000 2403 2403 508 508 2005-06-24 09:23:57.000 2 2 2020-12-23 07:15:42
5657 2005-07-10 07:33:43.000 4342 4342 508 508 2005-07-18 01:55:43.000 2 2 2020-12-23 07:16:40
5978 2005-07-11 00:16:54.000 1720 1720 508 508 2005-07-19 18:55:54.000 1 1 2020-12-23 07:16:45
6101 2005-07-11 06:50:33.000 2618 2618 508 508 2005-07-18 01:52:33.000 2 2 2020-12-23 07:16:46
6646 2005-07-12 10:41:34.000 4061 4061 508 508 2005-07-15 05:31:34.000 1 1 2020-12-23 07:16:54
6929 2005-07-26 22:59:19.000 3339 3339 508 508 2005-08-03 22:40:19.000 1 1 2020-12-23 07:16:59
7283 2005-07-27 12:02:41.000 3101 3101 508 508 2005-08-05 07:25:41.000 1 1 2020-12-23 07:17:04
7322 2005-07-27 13:37:26.000 1810 1810 508 508 2005-08-03 18:00:26.000 2 2 2020-12-23 07:17:05
7327 2005-07-27 13:53:26.000 4074 4074 508 508 2005-08-04 17:58:26.000 2 2 2020-12-23 07:17:05
7668 2005-07-28 02:41:31.000 3880 3880 508 508 2005-08-02 06:08:31.000 1 1 2020-12-23 07:17:10
7676 2005-07-28 02:55:27.000 1110 1110 508 508 2005-08-01 03:50:27.000 2 2 2020-12-23 07:17:10
8191 2005-07-28 22:47:14.000 1777 1777 508 508 2005-07-31 23:13:14.000 2 2 2020-12-23 07:17:17
9694 2005-07-31 07:13:16.000 3447 3447 508 508 2005-08-06 09:12:16.000 2 2 2020-12-23 07:17:39
9706 2005-07-31 07:43:19.000 142 142 508 508 2005-08-05 11:11:19.000 1 1 2020-12-23 07:17:39
10128 2005-07-31 21:40:04.000 2559 2559 508 508 2005-08-02 02:21:04.000 1 1 2020-12-23 07:17:45
10746 2005-08-01 19:58:49.000 305 305 508 508 2005-08-10 19:00:49.000 2 2 2020-12-23 07:17:54
11365 2005-08-02 18:00:09.000 1151 1151 508 508 2005-08-04 13:40:09.000 2 2 2020-12-23 07:18:03
11447 2005-08-02 20:36:25.000 3868 3868 508 508 2005-08-07 18:52:25.000 1 1 2020-12-23 07:18:04
13095 2005-08-19 10:48:10.000 520 520 508 508 2005-08-28 06:15:10.000 1 1 2020-12-23 07:18:27
13201 2005-08-19 14:56:05.000 111 111 508 508 2005-08-25 14:37:05.000 1 1 2020-12-23 07:18:28
14318 2006-02-14 15:16:03.000 1042 1042 508 508   2 2 2020-12-23 07:18:45
15010 2005-08-22 08:30:17.000 171 171 508 508 2005-08-29 13:24:17.000 2 2 2020-12-23 07:18:55
15195 2005-08-22 16:08:23.000 1080 1080 508 508 2005-08-30 17:56:23.000 2 2 2020-12-23 07:18:58

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