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; |
| 10 | } |
| 11 | |
| 12 | body { |
| 13 | font-family : "Helvetica"; |
| 14 | } |
| 15 | </style> |
| 16 | |
| 17 | <script src="../js/jquery.min.js"></script> |
| 18 | <script src="../core/js/easyXDM/easyXDM.debug.js"></script> |
| 19 | <script src="js/tinysocial.js"></script> |
| 20 | </head> |
| 21 | <body> |
| 22 | <h1>AQL: Querying TinySocial AsterixDB</h1> |
| 23 | |
| 24 | <h2>Query 0-A - Exact-Match Lookup</h2> |
| 25 | <div class="sample-query"> |
| 26 | |
| 27 | <div class="pretty-printed"> |
| 28 | use dataverse TinySocial;<br/><br/> |
| 29 | |
| 30 | for $user in dataset FacebookUsers<br/> |
| 31 | where $user.id = 8<br/> |
| 32 | return $user;<br/> |
| 33 | </div> |
| 34 | |
| 35 | <button>Run #0-A</button> |
| 36 | </div> |
| 37 | |
| 38 | <h2>Query 0-B - Range Scan</h2> |
| 39 | <div class="sample-query"> |
| 40 | |
| 41 | <div class="pretty-printed"> |
| 42 | use dataverse TinySocial;<br/><br/> |
| 43 | |
| 44 | for $user in dataset FacebookUsers<br/> |
| 45 | where $user.id >= 2 and $user.id <= 4<br/> |
| 46 | return $user;<br/> |
| 47 | </div> |
| 48 | |
| 49 | <button>Run #0-B</button> |
| 50 | </div> |
| 51 | |
| 52 | <h2>Query 1 - Other Query Filters</h2> |
| 53 | <div class="sample-query"> |
| 54 | <div class="pretty-printed"> |
| 55 | use dataverse TinySocial;<br/><br/> |
| 56 | |
| 57 | for $user in dataset FacebookUsers<br/> |
| 58 | where $user.user-since >= datetime('2010-07-22T00:00:00')<br/> |
| 59 | and $user.user-since <= datetime('2012-07-29T23:59:59')<br/> |
| 60 | return $user;<br/> |
| 61 | </div> |
| 62 | |
| 63 | <button>Run #1</button> |
| 64 | </div> |
| 65 | |
| 66 | <h2>Query 2-A - Equijoin</h2> |
| 67 | <div class="sample-query"> |
| 68 | <div class="pretty-printed"> |
| 69 | </div> |
| 70 | |
| 71 | <button>Run #2-A</button> |
| 72 | </div> |
| 73 | |
| 74 | <h2>Query 2-B - Index join</h2> |
| 75 | <div class="sample-query"> |
| 76 | <div class="pretty-printed"> |
| 77 | </div> |
| 78 | |
| 79 | <button>Run #2-B</button> |
| 80 | </div> |
| 81 | |
| 82 | <h2>Query 3 - Nested Outer Join</h2> |
| 83 | <div class="sample-query"> |
| 84 | <div class="pretty-printed"> |
| 85 | </div> |
| 86 | |
| 87 | <button>Run #3</button> |
| 88 | </div> |
| 89 | |
| 90 | <h2>Query 4 - Theta Join</h2> |
| 91 | <div class="sample-query"> |
| 92 | <div class="pretty-printed"> |
| 93 | </div> |
| 94 | |
| 95 | <button>Run #4</button> |
| 96 | </div> |
| 97 | |
| 98 | <h2>Query 5 - Fuzzy Join</h2> |
| 99 | <div class="sample-query"> |
| 100 | <div class="pretty-printed"> |
| 101 | </div> |
| 102 | |
| 103 | <button>Run #5</button> |
| 104 | </div> |
| 105 | |
| 106 | <h2>Query 6 - Existential Quantification</h2> |
| 107 | <div class="sample-query"> |
| 108 | <div class="pretty-printed"> |
| 109 | </div> |
| 110 | |
| 111 | <button>Run #6</button> |
| 112 | </div> |
| 113 | |
| 114 | <h2>Query 7 - Universal Quantification</h2> |
| 115 | <div class="sample-query"> |
| 116 | <div class="pretty-printed"> |
| 117 | </div> |
| 118 | |
| 119 | <button>Run #7</button> |
| 120 | </div> |
| 121 | |
| 122 | <h2>Query 8 - Simple Aggregation</h2> |
| 123 | <div class="sample-query"> |
| 124 | <div class="pretty-printed"> |
| 125 | </div> |
| 126 | |
| 127 | <button>Run #8</button> |
| 128 | </div> |
| 129 | |
| 130 | <h2>Query 9-A - Grouping and Aggregation</h2> |
| 131 | <div class="sample-query"> |
| 132 | <div class="pretty-printed"> |
| 133 | </div> |
| 134 | |
| 135 | <button>Run #9-A</button> |
| 136 | </div> |
| 137 | |
| 138 | <h2>Query 9-B - (Hash-Based) Grouping and Aggregation</h2> |
| 139 | <div class="sample-query"> |
| 140 | <div class="pretty-printed"> |
| 141 | </div> |
| 142 | |
| 143 | <button>Run #9-B</button> |
| 144 | </div> |
| 145 | |
| 146 | <h2>Query 10 - Grouping and Limits</h2> |
| 147 | <div class="sample-query"> |
| 148 | <div class="pretty-printed"> |
| 149 | </div> |
| 150 | |
| 151 | <button>Run #10</button> |
| 152 | </div> |
| 153 | |
| 154 | <h2>Query 11 - Left Outer Fuzzy Join</h2> |
| 155 | <div class="sample-query"> |
| 156 | <div class="pretty-printed"> |
| 157 | </div> |
| 158 | |
| 159 | <button>Run #11</button> |
| 160 | </div> |
| 161 | |
| 162 | </body> |
| 163 | </html> |