home / sakila

rental

32 rows where customer_id = 342

✎ 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
2190 2005-06-18 01:29:51.000 4398 4398 342 342 2005-06-26 04:31:51.000 2 2 2020-12-23 07:15:50
2914 2005-06-20 03:43:18.000 2419 2419 342 342 2005-06-25 03:44:18.000 2 2 2020-12-23 07:16:00
3081 2005-06-20 15:29:13.000 2071 2071 342 342 2005-06-24 21:00:13.000 2 2 2020-12-23 07:16:02
5617 2005-07-10 05:28:50.000 2324 2324 342 342 2005-07-12 00:02:50.000 2 2 2020-12-23 07:16:40
6060 2005-07-11 04:06:17.000 3146 3146 342 342 2005-07-12 03:05:17.000 1 1 2020-12-23 07:16:46
6429 2005-07-12 00:02:50.000 141 141 342 342 2005-07-21 02:08:50.000 1 1 2020-12-23 07:16:51
6736 2005-07-12 14:16:50.000 530 530 342 342 2005-07-15 16:26:50.000 1 1 2020-12-23 07:16:56
6787 2005-07-12 16:33:28.000 1481 1481 342 342 2005-07-18 21:48:28.000 2 2 2020-12-23 07:16:56
6997 2005-07-27 01:14:02.000 2130 2130 342 342 2005-07-29 01:12:02.000 2 2 2020-12-23 07:17:00
7280 2005-07-27 11:50:52.000 236 236 342 342 2005-07-30 15:53:52.000 2 2 2020-12-23 07:17:04
9164 2005-07-30 11:24:14.000 4434 4434 342 342 2005-08-08 16:24:14.000 1 1 2020-12-23 07:17:32
9526 2005-07-31 01:02:22.000 417 417 342 342 2005-08-04 03:00:22.000 1 1 2020-12-23 07:17:37
9948 2005-07-31 15:49:41.000 806 806 342 342 2005-08-06 12:36:41.000 1 1 2020-12-23 07:17:43
9955 2005-07-31 16:01:26.000 1745 1745 342 342 2005-08-04 11:15:26.000 2 2 2020-12-23 07:17:43
9956 2005-07-31 16:03:47.000 4485 4485 342 342 2005-08-01 16:40:47.000 2 2 2020-12-23 07:17:43
10242 2005-08-01 02:18:12.000 1825 1825 342 342 2005-08-02 22:32:12.000 2 2 2020-12-23 07:17:47
11178 2005-08-02 10:48:10.000 2613 2613 342 342 2005-08-06 06:07:10.000 1 1 2020-12-23 07:18:00
11446 2005-08-02 20:33:37.000 748 748 342 342 2005-08-03 18:22:37.000 1 1 2020-12-23 07:18:04
11568 2005-08-17 01:30:01.000 183 183 342 342 2005-08-18 22:21:01.000 2 2 2020-12-23 07:18:06
12139 2005-08-17 23:57:13.000 1537 1537 342 342 2005-08-24 19:13:13.000 1 1 2020-12-23 07:18:13
12404 2005-08-18 09:36:34.000 1097 1097 342 342 2005-08-23 10:12:34.000 2 2 2020-12-23 07:18:17
12522 2005-08-18 13:45:40.000 4435 4435 342 342 2005-08-27 17:05:40.000 1 1 2020-12-23 07:18:18
12816 2005-08-19 01:04:05.000 4051 4051 342 342 2005-08-24 01:25:05.000 1 1 2020-12-23 07:18:22
13368 2005-08-19 21:19:35.000 1073 1073 342 342 2005-08-21 16:12:35.000 2 2 2020-12-23 07:18:31
13637 2005-08-20 07:21:15.000 2298 2298 342 342 2005-08-24 10:13:15.000 2 2 2020-12-23 07:18:35
13755 2005-08-20 11:18:53.000 1927 1927 342 342 2005-08-27 06:51:53.000 2 2 2020-12-23 07:18:37
13827 2005-08-20 13:47:19.000 1103 1103 342 342 2005-08-28 09:13:19.000 1 1 2020-12-23 07:18:38
14096 2005-08-21 00:27:46.000 2089 2089 342 342 2005-08-22 22:53:46.000 1 1 2020-12-23 07:18:42
14299 2005-08-21 07:18:57.000 4028 4028 342 342 2005-08-24 01:28:57.000 1 1 2020-12-23 07:18:45
14683 2005-08-21 20:27:44.000 3850 3850 342 342 2005-08-29 16:54:44.000 1 1 2020-12-23 07:18:50
15484 2005-08-23 02:04:49.000 642 642 342 342 2005-08-24 05:46:49.000 1 1 2020-12-23 07:19:02
15895 2005-08-23 17:09:31.000 2275 2275 342 342 2005-08-30 17:15:31.000 1 1 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 11.517ms