home / sakila

rental

23 rows where customer_id = 85

✎ 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
690 2005-05-29 00:54:53.000 2646 2646 85 85 2005-06-06 00:45:53.000 1 1 2020-12-23 07:15:29
908 2005-05-30 10:38:37.000 4427 4427 85 85 2005-06-03 09:56:37.000 1 1 2020-12-23 07:15:32
1685 2005-06-16 12:06:57.000 2754 2754 85 85 2005-06-21 16:53:57.000 2 2 2020-12-23 07:15:42
2131 2005-06-17 21:02:25.000 4424 4424 85 85 2005-06-25 18:45:25.000 1 1 2020-12-23 07:15:49
2794 2005-06-19 18:53:05.000 1957 1957 85 85 2005-06-22 13:15:05.000 1 1 2020-12-23 07:15:58
3165 2005-06-20 21:29:17.000 796 796 85 85 2005-06-22 18:03:17.000 1 1 2020-12-23 07:16:03
3307 2005-06-21 07:52:30.000 462 462 85 85 2005-06-25 02:36:30.000 2 2 2020-12-23 07:16:05
3418 2005-06-21 17:06:38.000 4115 4115 85 85 2005-06-25 19:43:38.000 1 1 2020-12-23 07:16:07
4451 2005-07-07 23:29:54.000 179 179 85 85 2005-07-10 23:29:54.000 2 2 2020-12-23 07:16:22
4705 2005-07-08 11:50:38.000 3709 3709 85 85 2005-07-12 15:58:38.000 2 2 2020-12-23 07:16:26
5051 2005-07-09 03:57:53.000 4091 4091 85 85 2005-07-16 08:22:53.000 2 2 2020-12-23 07:16:31
5519 2005-07-10 01:18:32.000 1312 1312 85 85 2005-07-11 20:39:32.000 1 1 2020-12-23 07:16:38
7906 2005-07-28 11:31:42.000 1216 1216 85 85 2005-08-01 11:56:42.000 2 2 2020-12-23 07:17:13
9427 2005-07-30 21:16:33.000 1494 1494 85 85 2005-08-05 17:23:33.000 2 2 2020-12-23 07:17:35
9957 2005-07-31 16:03:55.000 1857 1857 85 85 2005-08-04 15:16:55.000 2 2 2020-12-23 07:17:43
9985 2005-07-31 17:14:47.000 1831 1831 85 85 2005-08-01 12:11:47.000 2 2 2020-12-23 07:17:44
10328 2005-08-01 04:56:10.000 1191 1191 85 85 2005-08-01 23:22:10.000 2 2 2020-12-23 07:17:48
10548 2005-08-01 12:44:32.000 1914 1914 85 85 2005-08-07 09:17:32.000 1 1 2020-12-23 07:17:51
11067 2005-08-02 07:03:24.000 965 965 85 85 2005-08-10 08:59:24.000 2 2 2020-12-23 07:17:58
12036 2005-08-17 20:19:06.000 3620 3620 85 85 2005-08-18 19:57:06.000 2 2 2020-12-23 07:18:12
12456 2005-08-18 11:21:51.000 4578 4578 85 85 2005-08-21 13:28:51.000 1 1 2020-12-23 07:18:17
13727 2005-08-20 10:08:53.000 4201 4201 85 85 2005-08-27 09:30:53.000 1 1 2020-12-23 07:18:36
13733 2005-08-20 10:25:12.000 3994 3994 85 85 2005-08-21 10:49:12.000 2 2 2020-12-23 07:18:36

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