genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | |
| 3 | <html> |
| 4 | <head> |
| 5 | <title>AsterixDB TinySocial Demo</title> |
| 6 | |
| 7 | <style> |
| 8 | .pretty-printed { |
| 9 | background-color: #eeeeee; |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 10 | margin-bottom: 1em; |
| 11 | } |
| 12 | |
| 13 | .how-to-run { |
| 14 | background-color: #c8c8c8; |
| 15 | margin-bottom: 1em; |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | body { |
| 19 | font-family : "Helvetica"; |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 20 | margin-bottom: 1em; |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 21 | } |
| 22 | </style> |
| 23 | |
| 24 | <script src="../js/jquery.min.js"></script> |
| 25 | <script src="../core/js/easyXDM/easyXDM.debug.js"></script> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 26 | <script src="http://localhost:19101/sdk/static/js/asterix-api-core.js"></script> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 27 | <script src="js/tinysocial.js"></script> |
| 28 | </head> |
| 29 | <body> |
| 30 | <h1>AQL: Querying TinySocial AsterixDB</h1> |
| 31 | |
| 32 | <h2>Query 0-A - Exact-Match Lookup</h2> |
| 33 | <div class="sample-query"> |
| 34 | |
| 35 | <div class="pretty-printed"> |
| 36 | use dataverse TinySocial;<br/><br/> |
| 37 | |
| 38 | for $user in dataset FacebookUsers<br/> |
| 39 | where $user.id = 8<br/> |
| 40 | return $user;<br/> |
| 41 | </div> |
| 42 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 43 | <div class="how-to-run"> |
| 44 | javascript here |
| 45 | </div> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 46 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 47 | <button id="run0a">Run #0-A</button> |
| 48 | </div> |
| 49 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 50 | <h2>Query 0-B - Range Scan</h2> |
| 51 | <div class="sample-query"> |
| 52 | |
| 53 | <div class="pretty-printed"> |
| 54 | use dataverse TinySocial;<br/><br/> |
| 55 | |
| 56 | for $user in dataset FacebookUsers<br/> |
| 57 | where $user.id >= 2 and $user.id <= 4<br/> |
| 58 | return $user;<br/> |
| 59 | </div> |
| 60 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 61 | <div class="how-to-run"> |
| 62 | </div> |
| 63 | |
| 64 | <button id="run0b">Run #0-B</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 65 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 66 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 67 | |
| 68 | <h2>Query 1 - Other Query Filters</h2> |
| 69 | <div class="sample-query"> |
| 70 | <div class="pretty-printed"> |
| 71 | use dataverse TinySocial;<br/><br/> |
| 72 | |
| 73 | for $user in dataset FacebookUsers<br/> |
| 74 | where $user.user-since >= datetime('2010-07-22T00:00:00')<br/> |
| 75 | and $user.user-since <= datetime('2012-07-29T23:59:59')<br/> |
| 76 | return $user;<br/> |
| 77 | </div> |
| 78 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 79 | <div class="how-to-run"> |
| 80 | </div> |
| 81 | |
| 82 | <button id="run1">Run #1</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 83 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 84 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 85 | |
| 86 | <h2>Query 2-A - Equijoin</h2> |
| 87 | <div class="sample-query"> |
| 88 | <div class="pretty-printed"> |
| 89 | </div> |
| 90 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 91 | <button id="run2a">Run #2-A</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 92 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 93 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 94 | |
| 95 | <h2>Query 2-B - Index join</h2> |
| 96 | <div class="sample-query"> |
| 97 | <div class="pretty-printed"> |
| 98 | </div> |
| 99 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 100 | <div class="how-to-run"> |
| 101 | </div> |
| 102 | |
| 103 | <button id="run2b">Run #2-B</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 104 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 105 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 106 | |
| 107 | <h2>Query 3 - Nested Outer Join</h2> |
| 108 | <div class="sample-query"> |
| 109 | <div class="pretty-printed"> |
| 110 | </div> |
| 111 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 112 | <div class="how-to-run"> |
| 113 | </div> |
| 114 | |
| 115 | <button id="run3">Run #3</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 116 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 117 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 118 | |
| 119 | <h2>Query 4 - Theta Join</h2> |
| 120 | <div class="sample-query"> |
| 121 | <div class="pretty-printed"> |
| 122 | </div> |
| 123 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 124 | <div class="how-to-run"> |
| 125 | </div> |
| 126 | |
| 127 | <button id="run4">Run #4</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 128 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 129 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 130 | |
| 131 | <h2>Query 5 - Fuzzy Join</h2> |
| 132 | <div class="sample-query"> |
| 133 | <div class="pretty-printed"> |
| 134 | </div> |
| 135 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 136 | <div class="how-to-run"> |
| 137 | </div> |
| 138 | |
| 139 | <button id="run5">Run #5</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 140 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 141 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 142 | |
| 143 | <h2>Query 6 - Existential Quantification</h2> |
| 144 | <div class="sample-query"> |
| 145 | <div class="pretty-printed"> |
| 146 | </div> |
| 147 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 148 | <div class="how-to-run"> |
| 149 | </div> |
| 150 | |
| 151 | <button id="run6">Run #6</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 152 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 153 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 154 | |
| 155 | <h2>Query 7 - Universal Quantification</h2> |
| 156 | <div class="sample-query"> |
| 157 | <div class="pretty-printed"> |
| 158 | </div> |
| 159 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 160 | <div class="how-to-run"> |
| 161 | </div> |
| 162 | |
| 163 | <button id="run7">Run #7</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 164 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 165 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 166 | |
| 167 | <h2>Query 8 - Simple Aggregation</h2> |
| 168 | <div class="sample-query"> |
| 169 | <div class="pretty-printed"> |
| 170 | </div> |
| 171 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 172 | <div class="how-to-run"> |
| 173 | </div> |
| 174 | |
| 175 | <button id="run8">Run #8</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 176 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 177 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 178 | |
| 179 | <h2>Query 9-A - Grouping and Aggregation</h2> |
| 180 | <div class="sample-query"> |
| 181 | <div class="pretty-printed"> |
| 182 | </div> |
| 183 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 184 | <div class="how-to-run"> |
| 185 | </div> |
| 186 | |
| 187 | <button id="run9a">Run #9-A</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 188 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 189 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 190 | |
| 191 | <h2>Query 9-B - (Hash-Based) Grouping and Aggregation</h2> |
| 192 | <div class="sample-query"> |
| 193 | <div class="pretty-printed"> |
| 194 | </div> |
| 195 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 196 | <div class="how-to-run"> |
| 197 | </div> |
| 198 | |
| 199 | <button id="run9b">Run #9-B</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 200 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 201 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 202 | |
| 203 | <h2>Query 10 - Grouping and Limits</h2> |
| 204 | <div class="sample-query"> |
| 205 | <div class="pretty-printed"> |
| 206 | </div> |
| 207 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 208 | <div class="how-to-run"> |
| 209 | </div> |
| 210 | |
| 211 | <button id="run10">Run #10</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 212 | </div> |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 213 | <hr/> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 214 | |
| 215 | <h2>Query 11 - Left Outer Fuzzy Join</h2> |
| 216 | <div class="sample-query"> |
| 217 | <div class="pretty-printed"> |
| 218 | </div> |
| 219 | |
genia.likes.science@gmail.com | 8dbf9dc | 2013-05-20 17:38:29 -0700 | [diff] [blame] | 220 | <div class="how-to-run"> |
| 221 | </div> |
| 222 | |
| 223 | <button id="run11">Run #11</button> |
genia.likes.science@gmail.com | 1cf49ad | 2013-05-16 03:48:20 -0700 | [diff] [blame] | 224 | </div> |
| 225 | |
| 226 | </body> |
| 227 | </html> |