home / sakila

rental

25 rows where customer_id = 264

✎ 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
1165 2005-06-14 23:16:27.000 2855 2855 264 264 2005-06-20 02:40:27.000 2 2 2020-12-23 07:15:35
1206 2005-06-15 02:27:07.000 1097 1097 264 264 2005-06-18 22:46:07.000 2 2 2020-12-23 07:15:36
3028 2005-06-20 11:50:52.000 886 886 264 264 2005-06-21 11:05:52.000 2 2 2020-12-23 07:16:01
3403 2005-06-21 15:55:06.000 1741 1741 264 264 2005-06-27 12:34:06.000 1 1 2020-12-23 07:16:06
3618 2005-07-06 05:58:45.000 330 330 264 264 2005-07-15 09:13:45.000 2 2 2020-12-23 07:16:10
4328 2005-07-07 18:03:17.000 2174 2174 264 264 2005-07-14 16:14:17.000 1 1 2020-12-23 07:16:20
4539 2005-07-08 04:01:02.000 2450 2450 264 264 2005-07-14 22:32:02.000 1 1 2020-12-23 07:16:24
6340 2005-07-11 19:46:05.000 2374 2374 264 264 2005-07-20 16:51:05.000 2 2 2020-12-23 07:16:50
6391 2005-07-11 22:23:09.000 1745 1745 264 264 2005-07-15 23:02:09.000 1 1 2020-12-23 07:16:51
6395 2005-07-11 22:29:29.000 3058 3058 264 264 2005-07-18 00:50:29.000 1 1 2020-12-23 07:16:51
6543 2005-07-12 04:54:32.000 2568 2568 264 264 2005-07-15 09:50:32.000 2 2 2020-12-23 07:16:53
7006 2005-07-27 01:42:20.000 3522 3522 264 264 2005-08-03 03:19:20.000 1 1 2020-12-23 07:17:00
9380 2005-07-30 19:17:31.000 4403 4403 264 264 2005-08-01 20:46:31.000 1 1 2020-12-23 07:17:35
9515 2005-07-31 00:35:05.000 3099 3099 264 264 2005-08-02 23:35:05.000 2 2 2020-12-23 07:17:37
9861 2005-07-31 13:04:14.000 1050 1050 264 264 2005-08-09 15:22:14.000 1 1 2020-12-23 07:17:42
9932 2005-07-31 15:19:48.000 1691 1691 264 264 2005-08-05 21:09:48.000 1 1 2020-12-23 07:17:43
10792 2005-08-01 21:44:24.000 1037 1037 264 264 2005-08-02 19:48:24.000 2 2 2020-12-23 07:17:55
11527 2005-08-17 00:25:06.000 162 162 264 264 2005-08-22 21:13:06.000 1 1 2020-12-23 07:18:05
11533 2005-08-17 00:34:53.000 4252 4252 264 264 2005-08-22 06:10:53.000 1 1 2020-12-23 07:18:05
11539 2005-08-17 00:45:41.000 2064 2064 264 264 2005-08-19 06:03:41.000 1 1 2020-12-23 07:18:05
12518 2005-08-18 13:41:32.000 3860 3860 264 264 2005-08-23 13:01:32.000 1 1 2020-12-23 07:18:18
13590 2005-08-20 05:48:59.000 4417 4417 264 264 2005-08-25 00:44:59.000 2 2 2020-12-23 07:18:34
13664 2005-08-20 08:18:36.000 3750 3750 264 264 2005-08-26 11:04:36.000 1 1 2020-12-23 07:18:35
14243 2006-02-14 15:16:03.000 1489 1489 264 264   1 1 2020-12-23 07:18:44
15595 2005-08-23 06:19:12.000 4046 4046 264 264 2005-08-31 04:52:12.000 1 1 2020-12-23 07:19:03

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