home / sakila

rental

25 rows where customer_id = 417

✎ 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
267 2005-05-26 16:16:21.000 1206 1206 417 417 2005-05-30 16:53:21.000 2 2 2020-12-23 07:15:23
630 2005-05-28 17:24:51.000 1254 1254 417 417 2005-06-05 20:05:51.000 2 2 2020-12-23 07:15:28
833 2005-05-29 23:21:56.000 2898 2898 417 417 2005-06-02 18:40:56.000 1 1 2020-12-23 07:15:31
1921 2005-06-17 06:04:16.000 4369 4369 417 417 2005-06-23 05:26:16.000 2 2 2020-12-23 07:15:46
3952 2005-07-06 21:51:31.000 1719 1719 417 417 2005-07-13 15:54:31.000 1 1 2020-12-23 07:16:15
4418 2005-07-07 22:05:30.000 4368 4368 417 417 2005-07-11 18:42:30.000 1 1 2020-12-23 07:16:22
4421 2005-07-07 22:07:55.000 4103 4103 417 417 2005-07-16 20:21:55.000 1 1 2020-12-23 07:16:22
6258 2005-07-11 15:24:32.000 632 632 417 417 2005-07-18 18:29:32.000 1 1 2020-12-23 07:16:48
6312 2005-07-11 18:19:02.000 2188 2188 417 417 2005-07-18 00:00:02.000 1 1 2020-12-23 07:16:49
8877 2005-07-30 00:15:22.000 1140 1140 417 417 2005-07-31 00:53:22.000 1 1 2020-12-23 07:17:27
9049 2005-07-30 06:57:28.000 2620 2620 417 417 2005-08-04 09:02:28.000 1 1 2020-12-23 07:17:30
10478 2005-08-01 10:09:06.000 3885 3885 417 417 2005-08-06 05:05:06.000 1 1 2020-12-23 07:17:50
11217 2005-08-02 12:26:31.000 1201 1201 417 417 2005-08-09 09:53:31.000 2 2 2020-12-23 07:18:00
11291 2005-08-02 14:57:58.000 491 491 417 417 2005-08-11 09:04:58.000 2 2 2020-12-23 07:18:01
11303 2005-08-02 15:39:18.000 1817 1817 417 417 2005-08-05 10:59:18.000 1 1 2020-12-23 07:18:02
12074 2005-08-17 21:50:57.000 711 711 417 417 2005-08-20 00:58:57.000 2 2 2020-12-23 07:18:12
12281 2005-08-18 04:50:32.000 4576 4576 417 417 2005-08-21 00:14:32.000 2 2 2020-12-23 07:18:15
13261 2006-02-14 15:16:03.000 3538 3538 417 417   1 1 2020-12-23 07:18:29
13545 2005-08-20 03:50:15.000 615 615 417 417 2005-08-27 22:24:15.000 1 1 2020-12-23 07:18:33
13927 2005-08-20 17:11:58.000 4284 4284 417 417 2005-08-24 12:44:58.000 1 1 2020-12-23 07:18:40
14121 2005-08-21 01:26:33.000 4207 4207 417 417 2005-08-28 22:47:33.000 2 2 2020-12-23 07:18:42
14304 2005-08-21 07:23:10.000 2650 2650 417 417 2005-08-26 11:21:10.000 2 2 2020-12-23 07:18:45
14607 2005-08-21 17:56:50.000 4518 4518 417 417 2005-08-22 17:44:50.000 2 2 2020-12-23 07:18:49
14882 2005-08-22 03:52:21.000 12 12 417 417 2005-08-25 04:50:21.000 2 2 2020-12-23 07:18:53
15795 2005-08-23 14:07:56.000 4371 4371 417 417 2005-08-25 12:10:56.000 2 2 2020-12-23 07:19:06

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