MySQL 3.23.57
Version of implementation MySQL of programming language SQLA version of MySQL.
Examples:
Factorial - SQL (46):
Replace TABLE
with name of any table you have access to, like mysql.help_topic
.
select concat(cast(t2.n as char), "! = ", cast(exp(sum(log(t1.n))) as char))
from
( select @i := @i+1 AS n
from TABLE, (select @i := 0) as sel1
limit 16 ) t1,
( select @j := @j+1 AS n
from TABLE, (select @j := 0) as sel1
limit 16 ) t2
where t1.n <= t2.n
group by t2.n
Fibonacci numbers - SQL (47):
Replace TABLE
with name of any table you have access to, like mysql.help_topic
.
select concat(group_concat(f separator ', '), ', ...')
from (select @f := @i + @j as f, @i := @j, @j := @f
from TABLE, (select @i := 1, @j := 0) sel1
limit 16) t
Hello, World! - SQL (15):
select 'Hello, World!';
Comments
]]>blog comments powered by Disqus
]]>