### Database Schema:
CREATE TABLE country (
	country_id	INTEGER	NULL	PRIMARY KEY,
	country_name	TEXT	NULL
);

CREATE TABLE book_author (
	book_id	INTEGER	NULL	PRIMARY KEY,
	author_id	INTEGER	NULL	PRIMARY KEY,
	foreign key (book_id) references book (book_id),
	foreign key (author_id) references author (author_id)
);

CREATE TABLE cust_order (
	order_id	INTEGER	NULL	PRIMARY KEY,
	order_date	DATETIME	NULL,
	customer_id	INTEGER	NULL,
	shipping_method_id	INTEGER	NULL,
	dest_address_id	INTEGER	NULL,
	foreign key (shipping_method_id) references shipping_method (method_id),
	foreign key (customer_id) references customer (customer_id),
	foreign key (dest_address_id) references address (address_id)
);

CREATE TABLE shipping_method (
	method_id	INTEGER	NULL	PRIMARY KEY,
	method_name	TEXT	NULL,
	cost	REAL	NULL
);

CREATE TABLE book (
	book_id	INTEGER	NULL	PRIMARY KEY,
	title	TEXT	NULL,
	isbn13	TEXT	NULL,
	language_id	INTEGER	NULL,
	num_pages	INTEGER	NULL,
	publication_date	DATE	NULL,
	publisher_id	INTEGER	NULL,
	foreign key (publisher_id) references publisher (publisher_id),
	foreign key (language_id) references book_language (language_id)
);

CREATE TABLE customer (
	customer_id	INTEGER	NULL	PRIMARY KEY,
	first_name	TEXT	NULL,
	last_name	TEXT	NULL,
	email	TEXT	NULL
);

CREATE TABLE order_history (
	history_id	INTEGER	NULL	PRIMARY KEY,
	order_id	INTEGER	NULL,
	status_id	INTEGER	NULL,
	status_date	DATETIME	NULL,
	foreign key (order_id) references cust_order (order_id),
	foreign key (status_id) references order_status (status_id)
);

CREATE TABLE author (
	author_id	INTEGER	NULL	PRIMARY KEY,
	author_name	TEXT	NULL
);

CREATE TABLE order_line (
	line_id	INTEGER	NULL	PRIMARY KEY,
	order_id	INTEGER	NULL,
	book_id	INTEGER	NULL,
	price	REAL	NULL,
	foreign key (order_id) references cust_order (order_id),
	foreign key (book_id) references book (book_id)
);

CREATE TABLE customer_address (
	customer_id	INTEGER	NULL	PRIMARY KEY,
	address_id	INTEGER	NULL	PRIMARY KEY,
	status_id	INTEGER	NULL,
	foreign key (address_id) references address (address_id),
	foreign key (customer_id) references customer (customer_id)
);

CREATE TABLE publisher (
	publisher_id	INTEGER	NULL	PRIMARY KEY,
	publisher_name	TEXT	NULL
);

CREATE TABLE order_status (
	status_id	INTEGER	NULL	PRIMARY KEY,
	status_value	TEXT	NULL
);

CREATE TABLE address_status (
	status_id	INTEGER	NULL	PRIMARY KEY,
	address_status	TEXT	NULL
);

CREATE TABLE book_language (
	language_id	INTEGER	NULL	PRIMARY KEY,
	language_code	TEXT	NULL,
	language_name	TEXT	NULL
);

CREATE TABLE address (
	address_id	INTEGER	NULL	PRIMARY KEY,
	street_number	TEXT	NULL,
	street_name	TEXT	NULL,
	city	TEXT	NULL,
	country_id	INTEGER	NULL,
	foreign key (country_id) references country (country_id)
);

### User's Query:
How many books were published by publisher "Thomas Nelson"?

### Extra Knowledge:
"Thomas Nelson" is the publisher_name
SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Thomas Nelson'