### Database Schema:
CREATE TABLE users (
	Id	INTEGER	NOT NULL	PRIMARY KEY,
	Reputation	INTEGER	NULL,
	CreationDate	DATETIME	NULL,
	DisplayName	TEXT	NULL,
	LastAccessDate	DATETIME	NULL,
	WebsiteUrl	TEXT	NULL,
	Location	TEXT	NULL,
	AboutMe	TEXT	NULL,
	Views	INTEGER	NULL,
	UpVotes	INTEGER	NULL,
	DownVotes	INTEGER	NULL,
	AccountId	INTEGER	NULL,
	Age	INTEGER	NULL,
	ProfileImageUrl	TEXT	NULL
);

CREATE TABLE comments (
	Id	INTEGER	NOT NULL	PRIMARY KEY,
	PostId	INTEGER	NULL,
	Score	INTEGER	NULL,
	Text	TEXT	NULL,
	CreationDate	DATETIME	NULL,
	UserId	INTEGER	NULL,
	UserDisplayName	TEXT	NULL,
	foreign key (UserId) references users (Id),
	foreign key (PostId) references posts (Id)
);

CREATE TABLE postHistory (
	Id	INTEGER	NOT NULL	PRIMARY KEY,
	PostHistoryTypeId	INTEGER	NULL,
	PostId	INTEGER	NULL,
	RevisionGUID	TEXT	NULL,
	CreationDate	DATETIME	NULL,
	UserId	INTEGER	NULL,
	Text	TEXT	NULL,
	Comment	TEXT	NULL,
	UserDisplayName	TEXT	NULL,
	foreign key (UserId) references users (Id),
	foreign key (PostId) references posts (Id)
);

CREATE TABLE tags (
	Id	INTEGER	NOT NULL	PRIMARY KEY,
	TagName	TEXT	NULL,
	Count	INTEGER	NULL,
	ExcerptPostId	INTEGER	NULL,
	WikiPostId	INTEGER	NULL,
	foreign key (ExcerptPostId) references posts (Id)
);

CREATE TABLE postLinks (
	Id	INTEGER	NOT NULL	PRIMARY KEY,
	CreationDate	DATETIME	NULL,
	PostId	INTEGER	NULL,
	RelatedPostId	INTEGER	NULL,
	LinkTypeId	INTEGER	NULL,
	foreign key (RelatedPostId) references posts (Id),
	foreign key (PostId) references posts (Id)
);

CREATE TABLE votes (
	Id	INTEGER	NOT NULL	PRIMARY KEY,
	PostId	INTEGER	NULL,
	VoteTypeId	INTEGER	NULL,
	CreationDate	DATE	NULL,
	UserId	INTEGER	NULL,
	BountyAmount	INTEGER	NULL,
	foreign key (UserId) references users (Id),
	foreign key (PostId) references posts (Id)
);

CREATE TABLE badges (
	Id	INTEGER	NOT NULL	PRIMARY KEY,
	UserId	INTEGER	NULL,
	Name	TEXT	NULL,
	Date	DATETIME	NULL,
	foreign key (UserId) references users (Id)
);

CREATE TABLE posts (
	Id	INTEGER	NOT NULL	PRIMARY KEY,
	PostTypeId	INTEGER	NULL,
	AcceptedAnswerId	INTEGER	NULL,
	CreaionDate	DATETIME	NULL,
	Score	INTEGER	NULL,
	ViewCount	INTEGER	NULL,
	Body	TEXT	NULL,
	OwnerUserId	INTEGER	NULL,
	LasActivityDate	DATETIME	NULL,
	Title	TEXT	NULL,
	Tags	TEXT	NULL,
	AnswerCount	INTEGER	NULL,
	CommentCount	INTEGER	NULL,
	FavoriteCount	INTEGER	NULL,
	LastEditorUserId	INTEGER	NULL,
	LastEditDate	DATETIME	NULL,
	CommunityOwnedDate	DATETIME	NULL,
	ParentId	INTEGER	NULL,
	ClosedDate	DATETIME	NULL,
	OwnerDisplayName	TEXT	NULL,
	LastEditorDisplayName	TEXT	NULL,
	foreign key (ParentId) references posts (Id),
	foreign key (LastEditorUserId) references users (Id),
	foreign key (OwnerUserId) references users (Id)
);

### User's Query:
Identify the number of adult users who have cast over 5000 upvotes.

### Extra Knowledge:
adult users refer to Age BETWEEN 19 and 65; over 5000 upvotes refer to UpVotes > 5000;
SELECT COUNT(Id) FROM users WHERE Age BETWEEN 19 AND 65 AND UpVotes > 5000