home / sakila

rental

24 rows where customer_id = 375

✎ 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
307 2005-05-26 21:48:13.000 1097 1097 375 375 2005-06-04 22:24:13.000 1 1 2020-12-23 07:15:24
412 2005-05-27 14:17:23.000 1400 1400 375 375 2005-05-29 15:07:23.000 2 2 2020-12-23 07:15:25
749 2005-05-29 09:33:33.000 1146 1146 375 375 2005-05-31 11:45:33.000 2 2 2020-12-23 07:15:29
873 2005-05-30 05:15:20.000 4568 4568 375 375 2005-06-07 00:49:20.000 2 2 2020-12-23 07:15:31
1404 2005-06-15 16:38:53.000 2776 2776 375 375 2005-06-16 20:37:53.000 1 1 2020-12-23 07:15:38
1499 2005-06-15 21:58:07.000 165 165 375 375 2005-06-22 19:37:07.000 2 2 2020-12-23 07:15:40
2236 2005-06-18 04:12:33.000 4001 4001 375 375 2005-06-23 04:07:33.000 1 1 2020-12-23 07:15:50
3981 2005-07-06 23:12:12.000 842 842 375 375 2005-07-13 01:47:12.000 2 2 2020-12-23 07:16:15
4335 2005-07-07 18:33:57.000 1332 1332 375 375 2005-07-11 13:23:57.000 1 1 2020-12-23 07:16:21
5474 2005-07-09 23:23:57.000 3608 3608 375 375 2005-07-15 03:11:57.000 1 1 2020-12-23 07:16:37
7856 2005-07-28 09:48:24.000 2376 2376 375 375 2005-07-29 09:49:24.000 2 2 2020-12-23 07:17:12
8900 2005-07-30 01:07:03.000 3057 3057 375 375 2005-08-06 04:07:03.000 1 1 2020-12-23 07:17:28
10274 2005-08-01 03:16:51.000 2916 2916 375 375 2005-08-04 22:22:51.000 2 2 2020-12-23 07:17:47
10589 2005-08-01 14:11:09.000 4280 4280 375 375 2005-08-09 09:28:09.000 2 2 2020-12-23 07:17:52
10640 2005-08-01 15:44:51.000 3020 3020 375 375 2005-08-06 15:52:51.000 1 1 2020-12-23 07:17:53
10672 2005-08-01 17:10:54.000 3674 3674 375 375 2005-08-07 12:19:54.000 2 2 2020-12-23 07:17:53
10859 2005-08-02 00:11:39.000 277 277 375 375 2005-08-08 19:52:39.000 1 1 2020-12-23 07:17:56
10961 2005-08-02 03:47:55.000 1416 1416 375 375 2005-08-09 02:03:55.000 1 1 2020-12-23 07:17:57
11008 2005-08-02 05:06:17.000 2831 2831 375 375 2005-08-10 01:22:17.000 2 2 2020-12-23 07:17:58
12122 2005-08-17 23:20:45.000 4030 4030 375 375 2005-08-25 04:23:45.000 2 2 2020-12-23 07:18:13
12663 2005-08-18 19:10:52.000 1163 1163 375 375 2005-08-19 15:46:52.000 1 1 2020-12-23 07:18:20
13836 2005-08-20 14:18:16.000 4271 4271 375 375 2005-08-21 18:13:16.000 2 2 2020-12-23 07:18:38
15004 2005-08-22 08:15:21.000 4464 4464 375 375 2005-08-28 10:35:21.000 1 1 2020-12-23 07:18:55
15505 2005-08-23 02:46:13.000 1144 1144 375 375 2005-08-26 23:34:13.000 2 2 2020-12-23 07:19:02

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