home / sakila

rental

33 rows where customer_id = 451

✎ 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
77 2005-05-25 11:31:59.000 1303 1303 451 451 2005-05-26 16:53:59.000 2 2 2020-12-23 07:15:21
328 2005-05-27 01:29:31.000 2524 2524 451 451 2005-06-01 02:27:31.000 1 1 2020-12-23 07:15:24
1113 2005-05-31 15:58:44.000 2078 2078 451 451 2005-06-05 18:05:44.000 2 2 2020-12-23 07:15:34
1202 2005-06-15 02:08:04.000 2821 2821 451 451 2005-06-16 21:56:04.000 1 1 2020-12-23 07:15:36
1851 2005-06-17 00:32:26.000 1121 1121 451 451 2005-06-22 19:54:26.000 2 2 2020-12-23 07:15:44
1940 2005-06-17 07:42:22.000 105 105 451 451 2005-06-22 11:59:22.000 1 1 2020-12-23 07:15:46
2671 2005-06-19 11:33:11.000 2164 2164 451 451 2005-06-26 14:30:11.000 2 2 2020-12-23 07:15:56
2909 2005-06-20 03:19:10.000 1701 1701 451 451 2005-06-25 06:06:10.000 2 2 2020-12-23 07:16:00
2917 2005-06-20 04:08:35.000 647 647 451 451 2005-06-24 01:17:35.000 1 1 2020-12-23 07:16:00
3316 2005-06-21 08:20:18.000 3271 3271 451 451 2005-06-28 07:44:18.000 1 1 2020-12-23 07:16:05
3826 2005-07-06 15:51:58.000 73 73 451 451 2005-07-13 12:35:58.000 1 1 2020-12-23 07:16:13
4538 2005-07-08 03:56:29.000 3638 3638 451 451 2005-07-15 08:24:29.000 1 1 2020-12-23 07:16:24
4794 2005-07-08 16:30:11.000 2497 2497 451 451 2005-07-17 12:41:11.000 2 2 2020-12-23 07:16:27
4930 2005-07-08 22:15:48.000 2057 2057 451 451 2005-07-15 21:02:48.000 2 2 2020-12-23 07:16:30
5005 2005-07-09 01:21:44.000 3034 3034 451 451 2005-07-14 20:27:44.000 1 1 2020-12-23 07:16:31
5518 2005-07-10 01:15:11.000 3340 3340 451 451 2005-07-18 19:28:11.000 2 2 2020-12-23 07:16:38
7018 2005-07-27 02:20:22.000 1078 1078 451 451 2005-08-02 05:04:22.000 2 2 2020-12-23 07:17:00
10337 2005-08-01 05:01:46.000 307 307 451 451 2005-08-10 02:41:46.000 1 1 2020-12-23 07:17:48
10856 2005-08-02 00:07:14.000 2010 2010 451 451 2005-08-04 02:48:14.000 2 2 2020-12-23 07:17:56
10950 2005-08-02 03:25:08.000 707 707 451 451 2005-08-07 23:11:08.000 2 2 2020-12-23 07:17:57
11167 2005-08-02 10:15:51.000 148 148 451 451 2005-08-09 09:18:51.000 1 1 2020-12-23 07:18:00
11381 2005-08-02 18:19:29.000 993 993 451 451 2005-08-08 20:39:29.000 2 2 2020-12-23 07:18:03
11790 2005-08-17 11:00:08.000 2384 2384 451 451 2005-08-20 05:15:08.000 2 2 2020-12-23 07:18:08
12371 2005-08-18 08:02:46.000 622 622 451 451 2005-08-19 02:50:46.000 2 2 2020-12-23 07:18:16
12422 2005-08-18 10:13:12.000 1855 1855 451 451 2005-08-20 14:36:12.000 2 2 2020-12-23 07:18:17
13003 2005-08-19 07:39:29.000 3431 3431 451 451 2005-08-23 05:48:29.000 2 2 2020-12-23 07:18:25
13100 2005-08-19 10:55:45.000 916 916 451 451 2005-08-25 12:28:45.000 1 1 2020-12-23 07:18:27
13252 2005-08-19 16:50:50.000 775 775 451 451 2005-08-22 22:09:50.000 2 2 2020-12-23 07:18:29
13380 2005-08-19 21:36:58.000 4250 4250 451 451 2005-08-22 23:55:58.000 1 1 2020-12-23 07:18:31
13666 2005-08-20 08:20:19.000 2007 2007 451 451 2005-08-22 03:22:19.000 1 1 2020-12-23 07:18:35
13705 2005-08-20 09:32:23.000 3663 3663 451 451 2005-08-21 13:51:23.000 1 1 2020-12-23 07:18:36
14500 2005-08-21 14:11:30.000 2024 2024 451 451 2005-08-27 12:19:30.000 1 1 2020-12-23 07:18:48
15651 2005-08-23 08:31:49.000 3393 3393 451 451 2005-08-26 02:57:49.000 1 1 2020-12-23 07:19:04

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