home / sakila

rental

22 rows where customer_id = 47

✎ 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
175 2005-05-26 03:46:26.000 4346 4346 47 47 2005-06-03 06:01:26.000 2 2 2020-12-23 07:15:22
207 2005-05-26 08:04:38.000 102 102 47 47 2005-05-27 09:32:38.000 2 2 2020-12-23 07:15:22
300 2005-05-26 20:57:00.000 249 249 47 47 2005-06-05 01:34:00.000 2 2 2020-12-23 07:15:24
1882 2005-06-17 03:17:21.000 1400 1400 47 47 2005-06-19 22:23:21.000 2 2 2020-12-23 07:15:45
2307 2005-06-18 08:34:59.000 4576 4576 47 47 2005-06-23 04:42:59.000 1 1 2020-12-23 07:15:51
3320 2005-06-21 08:29:41.000 860 860 47 47 2005-06-29 13:54:41.000 2 2 2020-12-23 07:16:05
3631 2005-07-06 06:36:53.000 4068 4068 47 47 2005-07-07 10:32:53.000 1 1 2020-12-23 07:16:10
4064 2005-07-07 04:29:20.000 1402 1402 47 47 2005-07-14 05:48:20.000 2 2 2020-12-23 07:16:16
5174 2005-07-09 09:31:59.000 3621 3621 47 47 2005-07-15 03:49:59.000 1 1 2020-12-23 07:16:33
6153 2005-07-11 09:31:04.000 105 105 47 47 2005-07-19 03:41:04.000 1 1 2020-12-23 07:16:47
6164 2005-07-11 10:16:23.000 2755 2755 47 47 2005-07-14 11:21:23.000 1 1 2020-12-23 07:16:47
6337 2005-07-11 19:30:47.000 3967 3967 47 47 2005-07-19 20:27:47.000 2 2 2020-12-23 07:16:50
8159 2005-07-28 21:09:28.000 1118 1118 47 47 2005-08-04 15:34:28.000 1 1 2020-12-23 07:17:17
8402 2005-07-29 06:25:45.000 186 186 47 47 2005-08-07 10:48:45.000 1 1 2020-12-23 07:17:20
8863 2005-07-29 23:52:01.000 75 75 47 47 2005-08-04 20:28:01.000 1 1 2020-12-23 07:17:27
9274 2005-07-30 15:07:04.000 4424 4424 47 47 2005-08-06 11:17:04.000 2 2 2020-12-23 07:17:33
11126 2005-08-02 08:59:04.000 3310 3310 47 47 2005-08-04 11:00:04.000 1 1 2020-12-23 07:17:59
11477 2005-08-02 22:09:01.000 1671 1671 47 47 2005-08-07 03:46:01.000 2 2 2020-12-23 07:18:04
12215 2005-08-18 02:35:39.000 4095 4095 47 47 2005-08-24 00:36:39.000 1 1 2020-12-23 07:18:14
12274 2005-08-18 04:41:47.000 265 265 47 47 2005-08-27 07:00:47.000 1 1 2020-12-23 07:18:15
14397 2005-08-21 10:25:56.000 3883 3883 47 47 2005-08-24 07:48:56.000 1 1 2020-12-23 07:18:46
15846 2005-08-23 15:39:18.000 3635 3635 47 47 2005-08-27 14:28:18.000 2 2 2020-12-23 07:19:07

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