home / sakila

rental

29 rows where customer_id = 485

✎ 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
1009 2005-05-31 01:47:35.000 2523 2523 485 485 2005-06-03 20:26:35.000 1 1 2020-12-23 07:15:33
1684 2005-06-16 11:57:34.000 806 806 485 485 2005-06-19 09:12:34.000 1 1 2020-12-23 07:15:42
1721 2005-06-16 15:01:36.000 3521 3521 485 485 2005-06-23 10:48:36.000 1 1 2020-12-23 07:15:43
3579 2005-07-06 03:47:47.000 3309 3309 485 485 2005-07-08 02:16:47.000 2 2 2020-12-23 07:16:09
3899 2005-07-06 19:12:40.000 4020 4020 485 485 2005-07-13 23:41:40.000 1 1 2020-12-23 07:16:14
3904 2005-07-06 19:30:57.000 3600 3600 485 485 2005-07-11 18:47:57.000 2 2 2020-12-23 07:16:14
4137 2005-07-07 08:17:06.000 2065 2065 485 485 2005-07-11 10:52:06.000 2 2 2020-12-23 07:16:18
4667 2005-07-08 10:06:26.000 3348 3348 485 485 2005-07-14 04:48:26.000 1 1 2020-12-23 07:16:26
5193 2005-07-09 10:28:18.000 2166 2166 485 485 2005-07-12 12:18:18.000 1 1 2020-12-23 07:16:33
5343 2005-07-09 17:23:43.000 92 92 485 485 2005-07-18 22:14:43.000 1 1 2020-12-23 07:16:35
5367 2005-07-09 18:39:15.000 1446 1446 485 485 2005-07-16 14:19:15.000 2 2 2020-12-23 07:16:36
5820 2005-07-10 16:04:59.000 1511 1511 485 485 2005-07-16 12:10:59.000 1 1 2020-12-23 07:16:43
6810 2005-07-12 17:54:19.000 2802 2802 485 485 2005-07-20 16:58:19.000 2 2 2020-12-23 07:16:57
6902 2005-07-12 21:57:16.000 314 314 485 485 2005-07-14 20:56:16.000 1 1 2020-12-23 07:16:58
7144 2005-07-27 07:00:37.000 4506 4506 485 485 2005-08-01 06:57:37.000 1 1 2020-12-23 07:17:02
8984 2005-07-30 04:31:50.000 2126 2126 485 485 2005-08-04 03:24:50.000 1 1 2020-12-23 07:17:29
9039 2005-07-30 06:24:28.000 4493 4493 485 485 2005-08-08 00:28:28.000 1 1 2020-12-23 07:17:30
9053 2005-07-30 07:07:39.000 2535 2535 485 485 2005-08-01 09:22:39.000 2 2 2020-12-23 07:17:30
9189 2005-07-30 12:20:59.000 4529 4529 485 485 2005-08-06 16:15:59.000 1 1 2020-12-23 07:17:32
9535 2005-07-31 01:18:53.000 2413 2413 485 485 2005-08-04 03:04:53.000 2 2 2020-12-23 07:17:37
9565 2005-07-31 02:32:00.000 3621 3621 485 485 2005-08-04 05:45:00.000 1 1 2020-12-23 07:17:37
10771 2005-08-01 20:49:35.000 1274 1274 485 485 2005-08-10 16:58:35.000 1 1 2020-12-23 07:17:55
10772 2005-08-01 20:51:10.000 132 132 485 485 2005-08-10 15:50:10.000 1 1 2020-12-23 07:17:55
11188 2005-08-02 11:17:11.000 1372 1372 485 485 2005-08-08 16:46:11.000 2 2 2020-12-23 07:18:00
11921 2005-08-17 16:12:27.000 494 494 485 485 2005-08-25 22:07:27.000 1 1 2020-12-23 07:18:10
11974 2005-08-17 17:56:48.000 1609 1609 485 485 2005-08-21 19:14:48.000 2 2 2020-12-23 07:18:11
12261 2005-08-18 04:16:06.000 4076 4076 485 485 2005-08-27 08:04:06.000 1 1 2020-12-23 07:18:15
12487 2005-08-18 12:45:24.000 2554 2554 485 485 2005-08-22 12:39:24.000 1 1 2020-12-23 07:18:18
13055 2005-08-19 09:36:28.000 3580 3580 485 485 2005-08-24 05:53:28.000 2 2 2020-12-23 07:18:26

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