home / sakila

rental

21 rows where customer_id = 556

✎ 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
184 2005-05-26 05:29:49.000 1970 1970 556 556 2005-05-28 10:10:49.000 1 1 2020-12-23 07:15:22
772 2005-05-29 13:08:06.000 3319 3319 556 556 2005-06-06 08:19:06.000 1 1 2020-12-23 07:15:30
1083 2005-05-31 11:04:48.000 2393 2393 556 556 2005-06-05 13:32:48.000 1 1 2020-12-23 07:15:34
2092 2005-06-17 18:12:16.000 4427 4427 556 556 2005-06-25 15:06:16.000 2 2 2020-12-23 07:15:48
2593 2005-06-19 05:40:11.000 2031 2031 556 556 2005-06-28 08:11:11.000 1 1 2020-12-23 07:15:55
2986 2005-06-20 08:50:28.000 478 478 556 556 2005-06-26 05:24:28.000 2 2 2020-12-23 07:16:01
3093 2005-06-20 16:06:14.000 2534 2534 556 556 2005-06-22 13:22:14.000 2 2 2020-12-23 07:16:02
3438 2005-06-21 19:31:40.000 1757 1757 556 556 2005-06-30 19:08:40.000 1 1 2020-12-23 07:16:07
4719 2005-07-08 12:33:00.000 1315 1315 556 556 2005-07-15 12:30:00.000 1 1 2020-12-23 07:16:26
4839 2005-07-08 18:13:10.000 1810 1810 556 556 2005-07-15 12:49:10.000 1 1 2020-12-23 07:16:28
4846 2005-07-08 18:29:05.000 417 417 556 556 2005-07-10 22:33:05.000 2 2 2020-12-23 07:16:28
5722 2005-07-10 11:10:04.000 2890 2890 556 556 2005-07-12 16:31:04.000 2 2 2020-12-23 07:16:41
6484 2005-07-12 02:04:10.000 4093 4093 556 556 2005-07-17 23:18:10.000 2 2 2020-12-23 07:16:52
8909 2005-07-30 01:28:03.000 2606 2606 556 556 2005-08-06 04:40:03.000 2 2 2020-12-23 07:17:28
10106 2005-07-31 21:00:47.000 3444 3444 556 556 2005-08-02 20:11:47.000 2 2 2020-12-23 07:17:45
10518 2005-08-01 11:44:08.000 4444 4444 556 556 2005-08-07 07:58:08.000 2 2 2020-12-23 07:17:51
11466 2005-08-02 21:46:46.000 3363 3363 556 556 2005-08-06 01:42:46.000 1 1 2020-12-23 07:18:04
11804 2005-08-17 11:42:45.000 1040 1040 556 556 2005-08-25 07:11:45.000 1 1 2020-12-23 07:18:09
12045 2005-08-17 20:40:46.000 469 469 556 556 2005-08-20 18:18:46.000 2 2 2020-12-23 07:18:12
14176 2005-08-21 03:09:23.000 4420 4420 556 556 2005-08-26 21:26:23.000 1 1 2020-12-23 07:18:43
15568 2005-08-23 05:24:09.000 988 988 556 556 2005-08-27 08:57:09.000 2 2 2020-12-23 07:19:03

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