home / sakila

rental

25 rows where customer_id = 235

✎ 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
807 2005-05-29 18:50:50.000 2195 2195 235 235 2005-06-03 18:36:50.000 2 2 2020-12-23 07:15:30
1148 2005-05-31 20:38:40.000 3307 3307 235 235 2005-06-02 18:35:40.000 2 2 2020-12-23 07:15:35
1493 2005-06-15 21:50:32.000 4581 4581 235 235 2005-06-17 01:02:32.000 2 2 2020-12-23 07:15:39
1811 2005-06-16 21:06:20.000 3700 3700 235 235 2005-06-21 21:59:20.000 2 2 2020-12-23 07:15:44
3581 2005-07-06 03:57:35.000 4520 4520 235 235 2005-07-07 08:07:35.000 2 2 2020-12-23 07:16:09
3752 2005-07-06 12:30:12.000 4561 4561 235 235 2005-07-13 12:13:12.000 1 1 2020-12-23 07:16:12
3968 2005-07-06 22:47:09.000 558 558 235 235 2005-07-12 21:01:09.000 1 1 2020-12-23 07:16:15
4592 2005-07-08 06:31:28.000 2141 2141 235 235 2005-07-10 06:08:28.000 2 2 2020-12-23 07:16:24
5790 2005-07-10 14:15:21.000 1696 1696 235 235 2005-07-14 08:53:21.000 2 2 2020-12-23 07:16:42
6047 2005-07-11 03:27:01.000 4147 4147 235 235 2005-07-16 06:42:01.000 2 2 2020-12-23 07:16:46
6352 2005-07-11 20:34:13.000 1143 1143 235 235 2005-07-13 19:49:13.000 1 1 2020-12-23 07:16:50
6466 2005-07-12 01:21:03.000 3369 3369 235 235 2005-07-14 04:05:03.000 1 1 2020-12-23 07:16:52
8120 2005-07-28 19:24:24.000 3993 3993 235 235 2005-07-31 14:31:24.000 2 2 2020-12-23 07:17:16
8446 2005-07-29 07:38:10.000 1593 1593 235 235 2005-08-06 04:39:10.000 2 2 2020-12-23 07:17:21
8781 2005-07-29 20:20:16.000 3746 3746 235 235 2005-07-30 16:19:16.000 2 2 2020-12-23 07:17:26
9019 2005-07-30 05:28:53.000 946 946 235 235 2005-08-03 02:16:53.000 2 2 2020-12-23 07:17:29
9519 2005-07-31 00:45:57.000 3767 3767 235 235 2005-08-06 00:59:57.000 2 2 2020-12-23 07:17:37
9587 2005-07-31 03:10:30.000 2966 2966 235 235 2005-08-06 06:54:30.000 2 2 2020-12-23 07:17:38
10155 2005-07-31 22:31:43.000 3176 3176 235 235 2005-08-07 02:43:43.000 1 1 2020-12-23 07:17:46
12332 2005-08-18 06:51:05.000 627 627 235 235 2005-08-20 04:28:05.000 2 2 2020-12-23 07:18:16
12502 2005-08-18 13:16:31.000 2153 2153 235 235 2005-08-19 17:47:31.000 1 1 2020-12-23 07:18:18
13070 2005-08-19 09:56:23.000 2214 2214 235 235 2005-08-24 09:08:23.000 2 2 2020-12-23 07:18:26
13469 2005-08-20 00:59:36.000 1410 1410 235 235 2005-08-24 22:41:36.000 1 1 2020-12-23 07:18:32
14749 2005-08-21 23:08:33.000 831 831 235 235 2005-08-29 20:46:33.000 2 2 2020-12-23 07:18:51
15034 2005-08-22 09:33:08.000 1331 1331 235 235 2005-08-29 13:04:08.000 1 1 2020-12-23 07:18:55

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.694ms