home / sakila

rental

35 rows where customer_id = 403

✎ 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
442 2005-05-27 18:12:13.000 1457 1457 403 403 2005-05-30 12:30:13.000 2 2 2020-12-23 07:15:25
517 2005-05-28 03:17:57.000 234 234 403 403 2005-05-29 06:33:57.000 1 1 2020-12-23 07:15:26
1221 2005-06-15 03:35:16.000 2124 2124 403 403 2005-06-18 03:11:16.000 1 1 2020-12-23 07:15:36
1249 2005-06-15 05:38:09.000 2120 2120 403 403 2005-06-22 10:29:09.000 1 1 2020-12-23 07:15:36
2488 2005-06-18 21:38:26.000 1338 1338 403 403 2005-06-24 02:08:26.000 2 2 2020-12-23 07:15:54
2927 2005-06-20 04:41:41.000 393 393 403 403 2005-06-23 01:59:41.000 1 1 2020-12-23 07:16:00
3049 2005-06-20 12:51:01.000 518 518 403 403 2005-06-29 10:53:01.000 1 1 2020-12-23 07:16:01
3356 2005-06-21 11:38:45.000 4532 4532 403 403 2005-06-26 17:18:45.000 1 1 2020-12-23 07:16:06
3644 2005-07-06 07:20:11.000 4309 4309 403 403 2005-07-11 10:26:11.000 2 2 2020-12-23 07:16:10
3737 2005-07-06 11:45:53.000 123 123 403 403 2005-07-13 15:27:53.000 1 1 2020-12-23 07:16:11
4096 2005-07-07 06:09:11.000 3911 3911 403 403 2005-07-08 09:17:11.000 2 2 2020-12-23 07:16:17
5982 2005-07-11 00:24:44.000 2329 2329 403 403 2005-07-14 04:42:44.000 2 2 2020-12-23 07:16:45
6322 2005-07-11 18:58:20.000 4115 4115 403 403 2005-07-14 16:41:20.000 2 2 2020-12-23 07:16:49
6342 2005-07-11 19:48:24.000 1851 1851 403 403 2005-07-13 14:09:24.000 2 2 2020-12-23 07:16:50
7103 2005-07-27 05:08:59.000 1697 1697 403 403 2005-07-29 03:42:59.000 2 2 2020-12-23 07:17:01
8013 2005-07-28 15:30:26.000 2074 2074 403 403 2005-08-05 16:29:26.000 1 1 2020-12-23 07:17:15
9058 2005-07-30 07:15:45.000 4214 4214 403 403 2005-07-31 02:57:45.000 2 2 2020-12-23 07:17:30
9486 2005-07-30 23:35:42.000 2787 2787 403 403 2005-08-09 02:08:42.000 2 2 2020-12-23 07:17:36
9794 2005-07-31 10:47:01.000 1771 1771 403 403 2005-08-02 06:52:01.000 2 2 2020-12-23 07:17:41
10109 2005-07-31 21:04:49.000 2852 2852 403 403 2005-08-08 19:25:49.000 1 1 2020-12-23 07:17:45
10443 2005-08-01 09:01:04.000 1965 1965 403 403 2005-08-04 09:07:04.000 2 2 2020-12-23 07:17:50
10547 2005-08-01 12:44:17.000 1707 1707 403 403 2005-08-08 06:53:17.000 1 1 2020-12-23 07:17:51
10789 2005-08-01 21:37:55.000 3298 3298 403 403 2005-08-07 17:01:55.000 2 2 2020-12-23 07:17:55
11038 2005-08-02 05:59:42.000 4452 4452 403 403 2005-08-08 04:37:42.000 2 2 2020-12-23 07:17:58
11391 2005-08-02 18:40:12.000 2039 2039 403 403 2005-08-10 15:55:12.000 1 1 2020-12-23 07:18:03
11427 2005-08-02 20:02:39.000 3287 3287 403 403 2005-08-04 22:26:39.000 2 2 2020-12-23 07:18:04
11460 2005-08-02 21:28:03.000 4113 4113 403 403 2005-08-08 18:24:03.000 1 1 2020-12-23 07:18:04
11558 2005-08-17 01:19:52.000 1681 1681 403 403 2005-08-19 00:47:52.000 2 2 2020-12-23 07:18:05
12005 2005-08-17 18:56:55.000 2062 2062 403 403 2005-08-25 20:23:55.000 2 2 2020-12-23 07:18:11
12132 2005-08-17 23:37:03.000 2600 2600 403 403 2005-08-22 04:53:03.000 2 2 2020-12-23 07:18:13
12793 2005-08-19 00:20:36.000 1195 1195 403 403 2005-08-28 02:43:36.000 1 1 2020-12-23 07:18:22
14519 2005-08-21 14:59:29.000 1541 1541 403 403 2005-08-22 11:48:29.000 2 2 2020-12-23 07:18:48
14662 2005-08-21 19:45:27.000 2969 2969 403 403 2005-08-23 14:44:27.000 2 2 2020-12-23 07:18:50
14725 2005-08-21 22:02:08.000 4427 4427 403 403 2005-08-23 03:59:08.000 2 2 2020-12-23 07:18:51
15410 2005-08-22 23:27:43.000 2052 2052 403 403 2005-08-29 05:12:43.000 2 2 2020-12-23 07:19:01

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