<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&quot;C0EMRn89fSp7ImA9WxNWFEw.&quot;"><id>tag:blogger.com,1999:blog-6832227571528843323</id><updated>2009-10-12T22:28:07.165-07:00</updated><title>Squilbo - The web based SQL tool</title><subtitle type="html">Squilbo is a web based SQL tool for MySQL and Microsoft SQL Server. It runs on IIS, and is about to enter BETA. &lt;a href="http://squilbo.com"&gt;Let us know&lt;/a&gt; if you'd like to try it!</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://squilbo.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://squilbo.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><author><name>Tobin Harris</name><uri>http://www.blogger.com/profile/02203581553681366247</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/Squilbo-TheWebBasedSqlTool" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;AkEGQ3w7fSp7ImA9WxRbGUk.&quot;"><id>tag:blogger.com,1999:blog-6832227571528843323.post-634512381263867242</id><published>2008-06-11T09:57:00.000-07:00</published><updated>2008-12-10T14:37:02.205-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-10T14:37:02.205-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="features" /><title>A quick way to generate pretty charts using only SQL</title><content type="html">Today I accidentally found I could generate simple charts in &lt;a href="http://squilbo.com/"&gt;Squilbo&lt;/a&gt; using simple SQL code.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_XCZWg0tDZP4/SFATOW0ENWI/AAAAAAAAAAg/ur1lxFu2Lns/s1600-h/squilbo_sparklines.png"&gt;&lt;img style="cursor: pointer;" src="http://4.bp.blogspot.com/_XCZWg0tDZP4/SFATOW0ENWI/AAAAAAAAAAg/ur1lxFu2Lns/s400/squilbo_sparklines.png" alt="" id="BLOGGER_PHOTO_ID_5210685906230719842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;To get the orange lines, I've embedded some HTML in the SQL. This works because Squilbo runs in the web browser, and therefore if your SQL results contain HTML, the results grid will render it!&lt;br /&gt;&lt;br /&gt;I'm not sure how useful all this is, but it is &lt;span style="font-weight: bold;"&gt;fun&lt;/span&gt; :)&lt;br /&gt;&lt;br /&gt;I've blogged about generating SQL "Sparklines" a &lt;a href="http://www.tobinharris.com/2008/2/28/draw-bar-charts-in-sql"&gt;few&lt;/a&gt; &lt;a href="http://www.tobinharris.com/2008/2/28/sql-sparklines"&gt;times&lt;/a&gt;, and the general idea works in any SQL IDE (Query Analyzer, Toad etc).&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;SQL&lt;/span&gt; looks like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 51, 0);"&gt;select&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 51, 0);"&gt; year(date_created) as Year,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 51, 0);"&gt; month(date_created) as Month, count(*) as Registrations,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 51, 0);"&gt; concat(concat('&amp;lt;span style=''background: orange; color: white''&amp;gt;',  replace(space(count(*)/10),' ','|')),  '&amp;lt;/span&amp;gt;') as Sparkline&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 51, 0);"&gt;from completions&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 51, 0);"&gt;group by 1,2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 51, 0);"&gt;order by year(date_created) desc, month(date_created) desc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 51, 0);"&gt;limit 20&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It's the concat function that's the intersting bit.&lt;br /&gt;&lt;br /&gt;See more &lt;a href="http://www.tobinharris.com/2008/2/28/draw-bar-charts-in-sql"&gt;advanced&lt;/a&gt; &lt;a href="http://www.tobinharris.com/2008/2/28/sql-sparklines"&gt;examples&lt;/a&gt; on &lt;a href="http://www.tobinharris.com/2008/2/28/draw-bar-charts-in-sql"&gt;my personal blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In case you're wondering, Squilbo isn't ready for public consumption yet. If you're interested in trying the BETA or just knowing when it's ready, then please &lt;a href="http://squilbo.com/home/interested_in_squilbo"&gt;let me know&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6832227571528843323-634512381263867242?l=squilbo.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://squilbo.blogspot.com/feeds/634512381263867242/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6832227571528843323&amp;postID=634512381263867242" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6832227571528843323/posts/default/634512381263867242?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6832227571528843323/posts/default/634512381263867242?v=2" /><link rel="alternate" type="text/html" href="http://squilbo.blogspot.com/2008/06/quick-way-to-generate-pretty-charts.html" title="A quick way to generate pretty charts using only SQL" /><author><name>Tobin Harris</name><uri>http://www.blogger.com/profile/02203581553681366247</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13990518910214133509" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_XCZWg0tDZP4/SFATOW0ENWI/AAAAAAAAAAg/ur1lxFu2Lns/s72-c/squilbo_sparklines.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry></feed>
