home / sakila

rental

25 rows where customer_id = 435

✎ 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
757 2005-05-29 10:29:47.000 1067 1067 435 435 2005-06-07 15:27:47.000 1 1 2020-12-23 07:15:29
806 2005-05-29 18:31:30.000 2386 2386 435 435 2005-05-31 00:18:30.000 2 2 2020-12-23 07:15:30
1443 2005-06-15 18:57:51.000 2485 2485 435 435 2005-06-18 14:18:51.000 2 2 2020-12-23 07:15:39
2984 2005-06-20 08:43:44.000 1819 1819 435 435 2005-06-22 03:08:44.000 2 2 2020-12-23 07:16:00
3690 2005-07-06 09:46:03.000 4405 4405 435 435 2005-07-07 12:12:03.000 1 1 2020-12-23 07:16:11
3918 2005-07-06 20:26:15.000 1111 1111 435 435 2005-07-15 20:32:15.000 1 1 2020-12-23 07:16:14
5220 2005-07-09 11:59:04.000 2577 2577 435 435 2005-07-15 06:20:04.000 1 1 2020-12-23 07:16:34
6051 2005-07-11 03:46:41.000 2675 2675 435 435 2005-07-11 22:36:41.000 2 2 2020-12-23 07:16:46
6935 2005-07-26 23:13:10.000 2771 2771 435 435 2005-07-27 18:09:10.000 1 1 2020-12-23 07:16:59
8386 2005-07-29 05:45:30.000 388 388 435 435 2005-08-05 03:56:30.000 2 2 2020-12-23 07:17:20
8891 2005-07-30 00:46:55.000 4093 4093 435 435 2005-08-06 23:32:55.000 2 2 2020-12-23 07:17:28
9269 2005-07-30 15:02:33.000 548 548 435 435 2005-08-02 16:32:33.000 1 1 2020-12-23 07:17:33
9655 2005-07-31 05:57:54.000 3403 3403 435 435 2005-08-06 02:00:54.000 1 1 2020-12-23 07:17:39
9829 2005-07-31 11:58:38.000 231 231 435 435 2005-08-07 08:11:38.000 2 2 2020-12-23 07:17:41
10998 2005-08-02 04:50:55.000 1479 1479 435 435 2005-08-11 03:43:55.000 1 1 2020-12-23 07:17:58
11041 2005-08-02 06:03:53.000 1897 1897 435 435 2005-08-03 11:57:53.000 1 1 2020-12-23 07:17:58
11786 2005-08-17 10:57:40.000 1487 1487 435 435 2005-08-24 06:48:40.000 2 2 2020-12-23 07:18:08
11796 2005-08-17 11:16:47.000 3983 3983 435 435 2005-08-18 16:55:47.000 2 2 2020-12-23 07:18:09
12046 2005-08-17 20:47:46.000 3895 3895 435 435 2005-08-19 16:09:46.000 2 2 2020-12-23 07:18:12
12741 2005-08-18 22:17:05.000 2084 2084 435 435 2005-08-25 20:07:05.000 2 2 2020-12-23 07:18:21
13208 2005-08-19 15:18:55.000 609 609 435 435 2005-08-24 11:59:55.000 1 1 2020-12-23 07:18:28
14696 2005-08-21 20:48:05.000 3776 3776 435 435 2005-08-25 14:55:05.000 1 1 2020-12-23 07:18:50
14765 2005-08-21 23:40:28.000 2817 2817 435 435 2005-08-25 04:55:28.000 2 2 2020-12-23 07:18:51
14850 2005-08-22 02:16:55.000 2405 2405 435 435 2005-08-26 21:08:55.000 1 1 2020-12-23 07:18:52
15136 2005-08-22 13:19:25.000 2606 2606 435 435 2005-08-24 07:28:25.000 2 2 2020-12-23 07:18:57

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