home / sakila

rental

29 rows where customer_id = 529

✎ 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
453 2005-05-27 19:31:16.000 4425 4425 529 529 2005-05-29 23:06:16.000 1 1 2020-12-23 07:15:26
1234 2005-06-15 04:21:52.000 709 709 529 529 2005-06-22 03:25:52.000 1 1 2020-12-23 07:15:36
1686 2005-06-16 12:08:20.000 3883 3883 529 529 2005-06-20 10:59:20.000 1 1 2020-12-23 07:15:42
3354 2005-06-21 11:29:49.000 1083 1083 529 529 2005-06-25 07:39:49.000 2 2 2020-12-23 07:16:06
4045 2005-07-07 03:26:14.000 1422 1422 529 529 2005-07-11 06:52:14.000 1 1 2020-12-23 07:16:16
4254 2005-07-07 14:13:52.000 3957 3957 529 529 2005-07-12 10:39:52.000 2 2 2020-12-23 07:16:19
4444 2005-07-07 23:07:44.000 764 764 529 529 2005-07-14 02:51:44.000 2 2 2020-12-23 07:16:22
4553 2005-07-08 04:43:41.000 2114 2114 529 529 2005-07-09 23:55:41.000 1 1 2020-12-23 07:16:24
5993 2005-07-11 01:06:41.000 3588 3588 529 529 2005-07-14 19:19:41.000 1 1 2020-12-23 07:16:45
6538 2005-07-12 04:50:26.000 1987 1987 529 529 2005-07-20 23:44:26.000 2 2 2020-12-23 07:16:53
6541 2005-07-12 04:53:41.000 1795 1795 529 529 2005-07-17 23:17:41.000 2 2 2020-12-23 07:16:53
6908 2005-07-12 22:08:46.000 3161 3161 529 529 2005-07-21 00:21:46.000 2 2 2020-12-23 07:16:58
7128 2005-07-27 06:14:36.000 143 143 529 529 2005-08-02 05:18:36.000 1 1 2020-12-23 07:17:02
8708 2005-07-29 17:24:13.000 4054 4054 529 529 2005-08-04 13:57:13.000 1 1 2020-12-23 07:17:25
8979 2005-07-30 04:20:25.000 1394 1394 529 529 2005-08-08 03:39:25.000 2 2 2020-12-23 07:17:29
9310 2005-07-30 16:57:09.000 2957 2957 529 529 2005-08-03 18:14:09.000 1 1 2020-12-23 07:17:34
9375 2005-07-30 19:10:17.000 3063 3063 529 529 2005-08-02 23:00:17.000 1 1 2020-12-23 07:17:35
10361 2005-08-01 05:53:49.000 318 318 529 529 2005-08-10 00:42:49.000 2 2 2020-12-23 07:17:49
11862 2005-08-17 13:54:53.000 2604 2604 529 529 2005-08-19 10:48:53.000 1 1 2020-12-23 07:18:09
12356 2005-08-18 07:37:05.000 493 493 529 529 2005-08-24 10:49:05.000 1 1 2020-12-23 07:18:16
12622 2005-08-18 17:34:11.000 278 278 529 529 2005-08-24 16:10:11.000 1 1 2020-12-23 07:18:20
13011 2005-08-19 07:53:58.000 1998 1998 529 529 2005-08-24 12:00:58.000 1 1 2020-12-23 07:18:25
13132 2005-08-19 12:10:57.000 1748 1748 529 529 2005-08-27 12:22:57.000 2 2 2020-12-23 07:18:27
13797 2005-08-20 12:33:36.000 2857 2857 529 529 2005-08-25 18:03:36.000 1 1 2020-12-23 07:18:37
13946 2005-08-20 17:44:32.000 3564 3564 529 529 2005-08-28 19:19:32.000 1 1 2020-12-23 07:18:40
14449 2005-08-21 12:13:18.000 653 653 529 529 2005-08-27 15:41:18.000 2 2 2020-12-23 07:18:47
14764 2005-08-21 23:37:47.000 1270 1270 529 529 2005-08-24 00:23:47.000 2 2 2020-12-23 07:18:51
14970 2005-08-22 06:49:29.000 536 536 529 529 2005-08-29 08:47:29.000 1 1 2020-12-23 07:18:54
15305 2005-08-22 19:46:05.000 671 671 529 529 2005-08-27 19:11:05.000 2 2 2020-12-23 07:18:59

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