home / sakila

rental

28 rows where customer_id = 559

✎ 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
2576 2005-06-19 04:34:15.000 2928 2928 559 559 2005-06-28 10:02:15.000 2 2 2020-12-23 07:15:55
2706 2005-06-19 13:56:51.000 373 373 559 559 2005-06-21 17:23:51.000 2 2 2020-12-23 07:15:57
3046 2005-06-20 12:42:59.000 471 471 559 559 2005-06-26 17:40:59.000 2 2 2020-12-23 07:16:01
3370 2005-06-21 13:27:01.000 1573 1573 559 559 2005-06-25 09:27:01.000 1 1 2020-12-23 07:16:06
3674 2005-07-06 09:03:13.000 3686 3686 559 559 2005-07-13 08:43:13.000 1 1 2020-12-23 07:16:11
4120 2005-07-07 07:07:03.000 987 987 559 559 2005-07-16 04:07:03.000 1 1 2020-12-23 07:16:17
4370 2005-07-07 20:05:36.000 1591 1591 559 559 2005-07-16 23:58:36.000 1 1 2020-12-23 07:16:21
5396 2005-07-09 19:42:52.000 3795 3795 559 559 2005-07-15 21:45:52.000 1 1 2020-12-23 07:16:36
6201 2005-07-11 12:18:07.000 4530 4530 559 559 2005-07-12 12:11:07.000 2 2 2020-12-23 07:16:48
6915 2005-07-12 22:28:09.000 1243 1243 559 559 2005-07-14 00:53:09.000 1 1 2020-12-23 07:16:58
7169 2005-07-27 07:51:39.000 735 735 559 559 2005-08-01 06:42:39.000 1 1 2020-12-23 07:17:02
7680 2005-07-28 02:59:08.000 1784 1784 559 559 2005-08-03 03:37:08.000 2 2 2020-12-23 07:17:10
8631 2005-07-29 14:08:06.000 98 98 559 559 2005-08-05 14:57:06.000 1 1 2020-12-23 07:17:24
9134 2005-07-30 10:00:21.000 3797 3797 559 559 2005-08-01 05:01:21.000 1 1 2020-12-23 07:17:31
9877 2005-07-31 13:41:57.000 1299 1299 559 559 2005-08-06 15:27:57.000 2 2 2020-12-23 07:17:42
10146 2005-07-31 22:17:56.000 1721 1721 559 559 2005-08-02 21:27:56.000 1 1 2020-12-23 07:17:46
10377 2005-08-01 06:28:28.000 2401 2401 559 559 2005-08-10 05:45:28.000 2 2 2020-12-23 07:17:49
10669 2005-08-01 17:03:28.000 2121 2121 559 559 2005-08-08 21:34:28.000 2 2 2020-12-23 07:17:53
10876 2005-08-02 00:31:58.000 2161 2161 559 559 2005-08-05 21:45:58.000 1 1 2020-12-23 07:17:56
11136 2005-08-02 09:22:57.000 1315 1315 559 559 2005-08-08 14:12:57.000 2 2 2020-12-23 07:17:59
13234 2005-08-19 16:17:15.000 976 976 559 559 2005-08-27 12:36:15.000 1 1 2020-12-23 07:18:29
13248 2005-08-19 16:47:41.000 2864 2864 559 559 2005-08-28 18:11:41.000 2 2 2020-12-23 07:18:29
13322 2005-08-19 19:43:08.000 2149 2149 559 559 2005-08-24 16:30:08.000 2 2 2020-12-23 07:18:30
13845 2005-08-20 14:31:21.000 3993 3993 559 559 2005-08-29 18:29:21.000 1 1 2020-12-23 07:18:38
14342 2005-08-21 08:39:26.000 2749 2749 559 559 2005-08-23 11:40:26.000 2 2 2020-12-23 07:18:46
14622 2005-08-21 18:25:59.000 2702 2702 559 559 2005-08-31 00:11:59.000 2 2 2020-12-23 07:18:49
15440 2005-08-23 00:37:21.000 2254 2254 559 559 2005-08-24 23:24:21.000 1 1 2020-12-23 07:19:01
15877 2005-08-23 16:33:33.000 2307 2307 559 559 2005-08-26 10:36:33.000 2 2 2020-12-23 07:19:07

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