home / sakila

rental

31 rows where customer_id = 494

✎ 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
608 2005-05-28 15:03:44.000 4254 4254 494 494 2005-06-04 17:14:44.000 2 2 2020-12-23 07:15:28
1683 2005-06-16 11:54:55.000 2361 2361 494 494 2005-06-18 08:51:55.000 2 2 2020-12-23 07:15:42
3511 2005-07-06 00:42:01.000 2128 2128 494 494 2005-07-09 23:08:01.000 1 1 2020-12-23 07:16:08
3803 2005-07-06 15:06:55.000 2062 2062 494 494 2005-07-08 18:53:55.000 1 1 2020-12-23 07:16:12
3913 2005-07-06 20:11:00.000 752 752 494 494 2005-07-08 14:42:00.000 1 1 2020-12-23 07:16:14
4086 2005-07-07 05:26:06.000 253 253 494 494 2005-07-12 00:45:06.000 2 2 2020-12-23 07:16:17
4397 2005-07-07 21:14:54.000 3085 3085 494 494 2005-07-13 19:24:54.000 2 2 2020-12-23 07:16:22
4551 2005-07-08 04:36:21.000 1160 1160 494 494 2005-07-17 10:23:21.000 2 2 2020-12-23 07:16:24
5083 2005-07-09 05:30:32.000 148 148 494 494 2005-07-11 02:20:32.000 1 1 2020-12-23 07:16:32
5180 2005-07-09 10:06:53.000 3684 3684 494 494 2005-07-12 15:25:53.000 1 1 2020-12-23 07:16:33
7258 2005-07-27 11:05:54.000 2079 2079 494 494 2005-08-02 11:36:54.000 1 1 2020-12-23 07:17:04
7546 2005-07-27 21:50:09.000 3683 3683 494 494 2005-08-05 03:07:09.000 2 2 2020-12-23 07:17:08
7737 2005-07-28 05:15:03.000 1235 1235 494 494 2005-08-04 01:24:03.000 1 1 2020-12-23 07:17:11
8333 2005-07-29 04:16:40.000 823 823 494 494 2005-08-02 10:10:40.000 2 2 2020-12-23 07:17:19
8895 2005-07-30 00:49:17.000 3217 3217 494 494 2005-07-31 01:56:17.000 1 1 2020-12-23 07:17:28
8934 2005-07-30 02:37:05.000 3223 3223 494 494 2005-08-01 20:42:05.000 1 1 2020-12-23 07:17:28
9012 2005-07-30 05:18:57.000 3604 3604 494 494 2005-08-06 06:21:57.000 1 1 2020-12-23 07:17:29
9510 2005-07-31 00:24:17.000 2301 2301 494 494 2005-08-08 18:47:17.000 2 2 2020-12-23 07:17:37
9799 2005-07-31 10:58:32.000 3008 3008 494 494 2005-08-01 12:08:32.000 1 1 2020-12-23 07:17:41
9943 2005-07-31 15:37:29.000 887 887 494 494 2005-08-09 18:25:29.000 1 1 2020-12-23 07:17:43
10403 2005-08-01 07:30:45.000 1968 1968 494 494 2005-08-03 03:03:45.000 2 2 2020-12-23 07:17:49
10623 2005-08-01 15:22:38.000 4426 4426 494 494 2005-08-03 11:03:38.000 2 2 2020-12-23 07:17:53
11152 2005-08-02 09:53:36.000 3887 3887 494 494 2005-08-11 14:58:36.000 1 1 2020-12-23 07:18:00
11987 2005-08-17 18:21:59.000 1478 1478 494 494 2005-08-25 19:20:59.000 1 1 2020-12-23 07:18:11
13094 2005-08-19 10:47:58.000 3178 3178 494 494 2005-08-21 06:20:58.000 1 1 2020-12-23 07:18:27
13301 2005-08-19 18:53:15.000 2261 2261 494 494 2005-08-26 21:37:15.000 1 1 2020-12-23 07:18:30
14634 2005-08-21 18:51:28.000 486 486 494 494 2005-08-29 19:30:28.000 2 2 2020-12-23 07:18:49
14832 2005-08-22 01:43:29.000 1828 1828 494 494 2005-08-29 07:19:29.000 2 2 2020-12-23 07:18:52
15086 2005-08-22 11:21:08.000 264 264 494 494 2005-08-30 08:18:08.000 2 2 2020-12-23 07:18:56
15156 2005-08-22 14:29:11.000 1174 1174 494 494 2005-08-30 17:48:11.000 2 2 2020-12-23 07:18:57
15291 2005-08-22 19:28:04.000 1461 1461 494 494 2005-08-26 15:07:04.000 1 1 2020-12-23 07:18:59

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