home / sakila

rental

24 rows where customer_id = 351

✎ 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
1137 2005-05-31 19:20:14.000 3259 3259 351 351 2005-06-07 16:10:14.000 1 1 2020-12-23 07:15:35
1792 2005-06-16 20:04:50.000 3800 3800 351 351 2005-06-26 00:57:50.000 1 1 2020-12-23 07:15:44
1869 2005-06-17 02:08:00.000 871 871 351 351 2005-06-19 21:43:00.000 1 1 2020-12-23 07:15:45
2759 2005-06-19 17:10:24.000 687 687 351 351 2005-06-24 21:56:24.000 2 2 2020-12-23 07:15:58
3836 2005-07-06 16:26:04.000 1148 1148 351 351 2005-07-10 15:08:04.000 1 1 2020-12-23 07:16:13
4544 2005-07-08 04:11:04.000 4471 4471 351 351 2005-07-09 22:48:04.000 1 1 2020-12-23 07:16:24
4756 2005-07-08 14:24:00.000 3068 3068 351 351 2005-07-12 16:16:00.000 1 1 2020-12-23 07:16:27
4761 2005-07-08 14:51:45.000 3556 3556 351 351 2005-07-14 20:28:45.000 1 1 2020-12-23 07:16:27
5280 2005-07-09 14:55:07.000 1177 1177 351 351 2005-07-12 10:05:07.000 2 2 2020-12-23 07:16:35
5912 2005-07-10 20:58:22.000 1187 1187 351 351 2005-07-17 01:15:22.000 2 2 2020-12-23 07:16:44
6180 2005-07-11 11:06:50.000 4401 4401 351 351 2005-07-19 09:03:50.000 2 2 2020-12-23 07:16:47
6664 2005-07-12 11:28:22.000 4578 4578 351 351 2005-07-15 09:30:22.000 1 1 2020-12-23 07:16:55
6777 2005-07-12 16:04:40.000 4089 4089 351 351 2005-07-20 15:05:40.000 2 2 2020-12-23 07:16:56
7630 2005-07-28 01:01:03.000 2798 2798 351 351 2005-07-31 01:08:03.000 2 2 2020-12-23 07:17:09
8512 2005-07-29 09:48:03.000 4132 4132 351 351 2005-07-31 13:40:03.000 1 1 2020-12-23 07:17:22
9707 2005-07-31 07:44:18.000 203 203 351 351 2005-08-08 12:45:18.000 1 1 2020-12-23 07:17:40
10119 2005-07-31 21:20:59.000 54 54 351 351 2005-08-02 23:14:59.000 2 2 2020-12-23 07:17:45
10501 2005-08-01 11:04:46.000 1792 1792 351 351 2005-08-02 12:10:46.000 2 2 2020-12-23 07:17:51
11127 2005-08-02 09:00:59.000 1106 1106 351 351 2005-08-05 11:54:59.000 2 2 2020-12-23 07:17:59
14368 2005-08-21 09:31:47.000 2063 2063 351 351 2005-08-30 04:17:47.000 1 1 2020-12-23 07:18:46
15142 2005-08-22 13:44:32.000 1337 1337 351 351 2005-08-29 14:19:32.000 1 1 2020-12-23 07:18:57
15664 2005-08-23 08:57:11.000 2029 2029 351 351 2005-08-31 14:19:11.000 2 2 2020-12-23 07:19:04
15712 2005-08-23 10:43:56.000 1882 1882 351 351 2005-08-29 15:35:56.000 2 2 2020-12-23 07:19:05
15762 2005-08-23 13:01:43.000 887 887 351 351 2005-08-26 16:35:43.000 1 1 2020-12-23 07:19:06

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