home / sakila

rental

34 rows where customer_id = 473

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
348 2005-05-27 04:50:56.000 1825 1825 473 473 2005-06-01 04:43:56.000 1 1 2020-12-23 07:15:24
942 2005-05-30 15:05:47.000 4279 4279 473 473 2005-06-08 15:59:47.000 2 2 2020-12-23 07:15:32
973 2005-05-30 20:27:45.000 1914 1914 473 473 2005-06-08 22:47:45.000 2 2 2020-12-23 07:15:33
1748 2005-06-16 16:54:03.000 2434 2434 473 473 2005-06-18 20:11:03.000 1 1 2020-12-23 07:15:43
2125 2005-06-17 20:53:42.000 4303 4303 473 473 2005-06-19 01:53:42.000 2 2 2020-12-23 07:15:49
2553 2005-06-19 03:04:59.000 923 923 473 473 2005-06-26 02:36:59.000 2 2 2020-12-23 07:15:55
2748 2005-06-19 16:22:26.000 511 511 473 473 2005-06-21 21:55:26.000 1 1 2020-12-23 07:15:57
3971 2005-07-06 22:50:40.000 4415 4415 473 473 2005-07-08 01:02:40.000 1 1 2020-12-23 07:16:15
4006 2005-07-07 00:25:29.000 397 397 473 473 2005-07-08 05:30:29.000 2 2 2020-12-23 07:16:16
4625 2005-07-08 08:14:26.000 318 318 473 473 2005-07-09 03:45:26.000 1 1 2020-12-23 07:16:25
4873 2005-07-08 19:23:32.000 4500 4500 473 473 2005-07-11 15:24:32.000 1 1 2020-12-23 07:16:29
5447 2005-07-09 22:09:28.000 2530 2530 473 473 2005-07-18 20:03:28.000 2 2 2020-12-23 07:16:37
6446 2005-07-12 00:44:08.000 3634 3634 473 473 2005-07-14 20:39:08.000 2 2 2020-12-23 07:16:51
6890 2005-07-12 21:03:03.000 2538 2538 473 473 2005-07-14 00:47:03.000 1 1 2020-12-23 07:16:58
7111 2005-07-27 05:38:16.000 1252 1252 473 473 2005-07-29 04:28:16.000 2 2 2020-12-23 07:17:01
7215 2005-07-27 09:24:00.000 2713 2713 473 473 2005-08-05 07:37:00.000 2 2 2020-12-23 07:17:03
7918 2005-07-28 11:58:53.000 63 63 473 473 2005-08-04 12:08:53.000 2 2 2020-12-23 07:17:13
7928 2005-07-28 12:15:51.000 912 912 473 473 2005-08-05 06:34:51.000 1 1 2020-12-23 07:17:13
9025 2005-07-30 05:50:08.000 2244 2244 473 473 2005-07-31 09:58:08.000 1 1 2020-12-23 07:17:30
9120 2005-07-30 09:26:08.000 139 139 473 473 2005-08-08 09:52:08.000 1 1 2020-12-23 07:17:31
10867 2005-08-02 00:24:15.000 2577 2577 473 473 2005-08-05 21:09:15.000 1 1 2020-12-23 07:17:56
11006 2005-08-02 05:05:52.000 2776 2776 473 473 2005-08-05 03:33:52.000 1 1 2020-12-23 07:17:58
11216 2005-08-02 12:23:43.000 1109 1109 473 473 2005-08-03 13:19:43.000 1 1 2020-12-23 07:18:00
11336 2005-08-02 16:58:56.000 1949 1949 473 473 2005-08-06 16:56:56.000 1 1 2020-12-23 07:18:02
11421 2005-08-02 19:51:53.000 3361 3361 473 473 2005-08-12 00:50:53.000 2 2 2020-12-23 07:18:03
11741 2005-08-17 08:48:39.000 1819 1819 473 473 2005-08-20 07:37:39.000 1 1 2020-12-23 07:18:08
13984 2005-08-20 19:12:30.000 2183 2183 473 473 2005-08-29 22:04:30.000 1 1 2020-12-23 07:18:40
14202 2005-08-21 03:51:52.000 1995 1995 473 473 2005-08-22 09:35:52.000 1 1 2020-12-23 07:18:44
14550 2005-08-21 15:56:39.000 2814 2814 473 473 2005-08-23 21:40:39.000 1 1 2020-12-23 07:18:48
14658 2005-08-21 19:41:50.000 1465 1465 473 473 2005-08-25 16:11:50.000 1 1 2020-12-23 07:18:50
14757 2005-08-21 23:23:37.000 1154 1154 473 473 2005-08-26 23:24:37.000 2 2 2020-12-23 07:18:51
15118 2005-08-22 12:38:37.000 2081 2081 473 473 2005-08-29 14:01:37.000 2 2 2020-12-23 07:18:56
15400 2005-08-22 23:13:03.000 2664 2664 473 473 2005-08-28 18:34:03.000 1 1 2020-12-23 07:19:01
16024 2005-08-23 21:46:47.000 2910 2910 473 473 2005-08-27 02:06:47.000 1 1 2020-12-23 07:19:10

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