Database schema:

CREATE TABLE location (
	"LocationID" INTEGER -- example: ['2', '1'],
	"Country" TEXT -- example: ['Algeria', 'Albania'],
	"State" TEXT -- example: ['Elbasan', 'Tirane'],
	"StateCode" TEXT -- example: ['AL', 'DZ'],
	"City" TEXT -- example: ['Elbasan', 'Tirana'],
	PRIMARY KEY ("LocationID")
)


CREATE TABLE twitter (
	"TweetID" TEXT -- example: ['tw-682712873332805633', 'tw-682713045357998080'],
	"Weekday" TEXT -- example: ['Friday', 'Thursday'],
	"Hour" INTEGER -- example: ['17', '18'],
	"Day" INTEGER -- example: ['1', '31'],
	"Lang" TEXT -- example: ['_u', 'en'],
	"IsReshare" TEXT -- example: ['FALSE', 'TRUE'],
	"Reach" INTEGER -- example: ['1810', '44'],
	"RetweetCount" INTEGER -- example: ['0', '5'],
	"Likes" INTEGER -- example: ['0', '131'],
	"Klout" INTEGER -- example: ['53', '35'],
	"Sentiment" REAL -- example: ['0.0', '2.0'],
	text TEXT -- example: ['We are hiring: Senior Software Engineer - Proto ht', 'RT @CodeMineStatus: This is true Amazon Web Servic'],
	"LocationID" INTEGER -- example: ['3751', '3989'],
	"UserID" TEXT -- example: ['tw-3179389829', 'tw-40932430'],
	PRIMARY KEY ("TweetID"), 
	CONSTRAINT fk_twitter_location FOREIGN KEY("LocationID") REFERENCES location ("LocationID"),
	CONSTRAINT fk_twitter_user FOREIGN KEY("UserID") REFERENCES user ("UserID")
)


CREATE TABLE user (
	"UserID" TEXT -- example: ['tw-10000632', '\x1anknow531394'],
	"Gender" TEXT -- example: ['Unknown', 'Male'],
	PRIMARY KEY ("UserID")
)

Question: Among all the tweets with a positive sentiment, what is the percentage of those posted by a male user?
Evidence: positive sentiment refers to Sentiment > 0; male user refers to Gender = 'Male'; percentage = Divide (Count(TweetID where Gender = 'Male'), Count (TweetID)) * 100

SQL:
SELECT SUM(CASE WHEN T2.Gender = 'Male' THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS per FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Sentiment > 0