presentations/highlight-js/test/markup/sql/interval.expect.txt

18 lines
2.3 KiB
Text
Raw Permalink Normal View History

2018-12-07 08:48:05 -06:00
<span class="hljs-keyword">SELECT</span>
<span class="hljs-keyword">CURRENT_TIMESTAMP</span>
- <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">2</span> <span class="hljs-keyword">YEARS</span>
+ <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">1</span> <span class="hljs-keyword">MONTH</span>
- <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">3</span> <span class="hljs-keyword">DAYS</span>
+ <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">10</span> <span class="hljs-keyword">HOURS</span>
+ <span class="hljs-built_in">interval</span> <span class="hljs-number">30</span> <span class="hljs-keyword">MINUTES</span>
- <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">20</span> <span class="hljs-keyword">SECOND</span> <span class="hljs-keyword">AS</span> past_timestamp
<span class="hljs-keyword">FROM</span> <span class="hljs-keyword">VALUES</span> (<span class="hljs-string">"dummy"</span>);
<span class="hljs-keyword">WITH</span> ts <span class="hljs-keyword">AS</span> (
<span class="hljs-keyword">SELECT</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> <span class="hljs-keyword">AS</span> <span class="hljs-keyword">now</span> <span class="hljs-keyword">FROM</span> <span class="hljs-keyword">VALUES</span> (<span class="hljs-string">'dummy'</span>)
)
<span class="hljs-keyword">SELECT</span>
<span class="hljs-keyword">now</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">1</span> <span class="hljs-keyword">DAY</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">2</span> <span class="hljs-keyword">HOURS</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">3</span> <span class="hljs-keyword">MINUTES</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-number">4</span> <span class="hljs-keyword">SECONDS</span> <span class="hljs-keyword">AS</span> LONG_VERSION,
<span class="hljs-keyword">now</span> - <span class="hljs-built_in">INTERVAL</span> <span class="hljs-string">'1 2:3:4.100'</span> <span class="hljs-keyword">DAY</span> <span class="hljs-keyword">TO</span> <span class="hljs-keyword">SECOND</span> <span class="hljs-keyword">AS</span> SHORT_VERSION
<span class="hljs-keyword">FROM</span> ts;