home / sakila

rental

23 rows where customer_id = 341

✎ 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
1318 2005-06-15 10:34:26.000 2760 2760 341 341 2005-06-20 16:20:26.000 1 1 2020-12-23 07:15:37
1520 2005-06-15 23:57:20.000 3419 3419 341 341 2005-06-24 23:46:20.000 1 1 2020-12-23 07:15:40
1778 2005-06-16 18:54:48.000 2512 2512 341 341 2005-06-22 16:08:48.000 2 2 2020-12-23 07:15:43
1849 2005-06-17 00:13:19.000 2507 2507 341 341 2005-06-23 18:37:19.000 2 2 2020-12-23 07:15:44
2829 2005-06-19 21:11:30.000 2047 2047 341 341 2005-06-24 18:10:30.000 1 1 2020-12-23 07:15:58
3130 2005-06-20 19:03:22.000 2569 2569 341 341 2005-06-29 18:05:22.000 2 2 2020-12-23 07:16:02
3382 2005-06-21 14:05:23.000 131 131 341 341 2005-06-29 19:13:23.000 2 2 2020-12-23 07:16:06
3938 2005-07-06 21:15:45.000 1991 1991 341 341 2005-07-13 20:02:45.000 2 2 2020-12-23 07:16:15
4624 2005-07-08 08:12:17.000 1548 1548 341 341 2005-07-15 12:24:17.000 2 2 2020-12-23 07:16:25
5487 2005-07-10 00:01:50.000 1144 1144 341 341 2005-07-10 20:43:50.000 1 1 2020-12-23 07:16:38
5931 2005-07-10 22:04:19.000 2259 2259 341 341 2005-07-13 00:45:19.000 2 2 2020-12-23 07:16:44
7473 2005-07-27 19:05:40.000 401 401 341 341 2005-08-05 14:47:40.000 1 1 2020-12-23 07:17:07
8661 2005-07-29 15:28:24.000 3409 3409 341 341 2005-08-05 20:04:24.000 2 2 2020-12-23 07:17:24
8728 2005-07-29 18:12:49.000 973 973 341 341 2005-08-06 22:45:49.000 1 1 2020-12-23 07:17:25
10605 2005-08-01 14:36:26.000 680 680 341 341 2005-08-06 12:04:26.000 2 2 2020-12-23 07:17:52
11305 2005-08-02 15:44:55.000 1690 1690 341 341 2005-08-08 16:42:55.000 2 2 2020-12-23 07:18:02
11723 2005-08-17 07:56:22.000 1665 1665 341 341 2005-08-22 03:49:22.000 1 1 2020-12-23 07:18:08
13059 2005-08-19 09:42:01.000 3810 3810 341 341 2005-08-21 12:07:01.000 1 1 2020-12-23 07:18:26
13074 2005-08-19 10:06:53.000 3266 3266 341 341 2005-08-28 09:56:53.000 2 2 2020-12-23 07:18:26
13806 2005-08-20 12:53:46.000 444 444 341 341 2005-08-21 10:36:46.000 1 1 2020-12-23 07:18:38
14344 2005-08-21 08:40:56.000 1562 1562 341 341 2005-08-27 12:40:56.000 1 1 2020-12-23 07:18:46
15030 2005-08-22 09:10:21.000 3168 3168 341 341 2005-08-24 06:00:21.000 2 2 2020-12-23 07:18:55
15938 2005-08-23 18:43:31.000 2884 2884 341 341 2005-08-31 00:26:31.000 2 2 2020-12-23 07:19:08

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