home / sakila

rental

25 rows where customer_id = 460

✎ 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
223 2005-05-26 10:15:23.000 3121 3121 460 460 2005-05-30 11:43:23.000 1 1 2020-12-23 07:15:23
298 2005-05-26 20:52:26.000 1083 1083 460 460 2005-05-29 22:08:26.000 2 2 2020-12-23 07:15:24
880 2005-05-30 06:12:33.000 1819 1819 460 460 2005-06-02 04:35:33.000 2 2 2020-12-23 07:15:31
1064 2005-05-31 08:50:07.000 2373 2373 460 460 2005-06-02 14:47:07.000 2 2 2020-12-23 07:15:34
1392 2005-06-15 16:12:27.000 363 363 460 460 2005-06-16 17:30:27.000 2 2 2020-12-23 07:15:38
3820 2005-07-06 15:35:26.000 4192 4192 460 460 2005-07-11 12:22:26.000 2 2 2020-12-23 07:16:13
4452 2005-07-07 23:31:54.000 2414 2414 460 460 2005-07-14 04:05:54.000 1 1 2020-12-23 07:16:22
5482 2005-07-09 23:53:04.000 2136 2136 460 460 2005-07-15 04:59:04.000 1 1 2020-12-23 07:16:38
6613 2005-07-12 08:30:07.000 3421 3421 460 460 2005-07-14 10:25:07.000 2 2 2020-12-23 07:16:54
6788 2005-07-12 16:33:44.000 1162 1162 460 460 2005-07-20 15:38:44.000 2 2 2020-12-23 07:16:56
7125 2005-07-27 06:11:00.000 801 801 460 460 2005-08-04 09:41:00.000 2 2 2020-12-23 07:17:02
7785 2005-07-28 07:16:11.000 4277 4277 460 460 2005-08-02 03:43:11.000 1 1 2020-12-23 07:17:11
8656 2005-07-29 15:05:52.000 1385 1385 460 460 2005-07-31 20:57:52.000 2 2 2020-12-23 07:17:24
10754 2005-08-01 20:12:33.000 2122 2122 460 460 2005-08-10 01:07:33.000 2 2 2020-12-23 07:17:54
10926 2005-08-02 02:26:37.000 4016 4016 460 460 2005-08-09 20:55:37.000 1 1 2020-12-23 07:17:57
11554 2005-08-17 01:05:17.000 2212 2212 460 460 2005-08-20 06:20:17.000 2 2 2020-12-23 07:18:05
12056 2005-08-17 21:03:48.000 1091 1091 460 460 2005-08-21 22:42:48.000 2 2 2020-12-23 07:18:12
12586 2005-08-18 15:54:39.000 4245 4245 460 460 2005-08-21 19:29:39.000 1 1 2020-12-23 07:18:19
12865 2005-08-19 02:38:50.000 3437 3437 460 460 2005-08-21 02:33:50.000 1 1 2020-12-23 07:18:23
13215 2005-08-19 15:35:38.000 3740 3740 460 460 2005-08-27 12:16:38.000 1 1 2020-12-23 07:18:28
13341 2005-08-19 20:18:53.000 1749 1749 460 460 2005-08-27 14:36:53.000 1 1 2020-12-23 07:18:30
13920 2005-08-20 16:51:18.000 3200 3200 460 460 2005-08-27 16:05:18.000 2 2 2020-12-23 07:18:39
14864 2005-08-22 02:57:06.000 2872 2872 460 460 2005-08-22 22:19:06.000 1 1 2020-12-23 07:18:53
14923 2005-08-22 05:13:33.000 3434 3434 460 460 2005-08-28 01:39:33.000 2 2 2020-12-23 07:18:53
15954 2005-08-23 19:14:07.000 576 576 460 460 2005-08-24 20:21:07.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 15.018ms