Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Since the tags aren't as obvious using query, you can always assign the AS statement    ie: storyText as story.content

Story Samples




Brexit StoriesAll Stories that include mention of BrexitSELECT storyText, header FROM story WHERE storyText like '%brexit%'
Hilary Clinton StoriesAll Stories that include mention of ClintonSELECT storyText, header FROM story WHERE storyText like '%clinton%'

Sports Samples




Final MLB ScoresAll MLB Scores that are finalSELECT L.name as league, V.location as vlocation, V.code as vcode, V.name as vname, S.vscore as vscore, H.location as hlocation, H.code as hcode, H.name as hname, S.hscore as hscore, S.status FROM score S, team V, team H, league L WHERE S.leagueID = L.id AND S.vteamid = V.id AND S.hteamid = H.id AND S.gamestate = 'Final' AND L.name = 'MLB'
Final ScoresAll scores that have gone finalSELECT L.name, V.location as vlocation, V.code as vcode, V.name as vname, S.vscore, H.location as hlocation, H.code as hcode, H.name as hname, S.hscore, S.status FROM score S, team V, team H, league L WHERE S.leagueID = L.id AND S.vteamid = V.id AND S.hteamid = H.id AND S.gamestate = 'Final'
New York GamesGames that include NYC teamsSELECT L.name, V.location as vlocation, V.code as vcode, V.name as vname, S.vscore, H.location as hlocation, H.code as hcode, H.name as hname, S.hscore, S.status FROM score S, team V, team H, league L WHERE S.leagueID = L.id AND S.vteamid = V.id AND S.hteamid = H.id AND (V.location = 'New York' OR H.location = 'New York')

Finance Samples




Highest Volume StocksThe 5 highest volume stocksSELECT name, symbol, volume FROM stock ORDER BY volume DESC limit 5
Top Gaining StocksThe 5 top gaining stocks by percentageSELECT name, symbol, volume, priceChange/price as percentChange, price, priceChange FROM stock ORDER BY priceChange/price DESC limit 5
Top Losing StocksThe 5 top losing stocks by percentageSELECT name, symbol, volume, priceChange/price as percentChange, price, priceChange FROM stock ORDER BY priceChange/price ASC limit 5

Tweet Samples




Tweets with Trump
SELECT `tweet`, `fromAccount`, `fromName`, `avatarUrl` FROM tweet WHERE `tweet` like '%trump%'






Weather Samples




Hottest CitiesThe 5 hottest citiesSELECT C.cityName as name, D.temp as temp, CONCAT('file:///D:/',W.`filename`) as media FROM weather W, weather_city C, weather_city_details D WHERE D.detailType = 'current' AND D.cityID = C.id AND w.`ID` = D.`weatherId` ORDER BY D.temp DESC LIMIT 5
The Hottest CityThe hottest citySELECT C.cityName, D.temp, D.shortText FROM weather_city C, weather_city_details D WHERE D.detailType = 'current' AND D.cityID = C.id ORDER BY D.temp DESC LIMIT 1
The Coldest CityThe coldest citySELECT C.cityName, D.temp, D.shortText FROM weather_city C, weather_city_details D WHERE D.detailType = 'current' AND D.cityID = C.id ORDER BY D.temp ASC LIMIT 1

Schedule Samples




Prime Time Schedule LineupPrime Time ScheduleSELECT P.name, P.hashtag, S.start FROM channel C, program P, program_schedule S
WHERE S.programID=P.ID AND S.channelID=C.ID AND C.name='BL Demo Channel'
AND Date(S.start)=Date(now()) AND Time(S.start)>Time('19:00:00') AND Time(S.start)<Time('23:00:00')


SELECT P.name, P.hashtag, S.start FROM channel C, program P, program_schedule S
WHERE S.programID=P.ID AND S.channelID=C.ID AND C.name='BL Demo Channel'
AND Date(S.start)=Date(now()) AND Time(S.start)>Time('19:00:00')



In this section:



  • No labels