#22
Example #1
a = ["lions", "tigers", "bears"]
b = tigers
=> true
Solution
def function(var0, var1)
  var2 = var0.include?(var1)
end

About

Bigbrain is a web based SQL generator. It uses an example lead approach to work out the sort of query you need.

To use the generator simple populate the blank table with some sample values. If your query requires multiple tables you should add them too. Then populate the results table with the sample values you want your SQL query to retrive.

When you request the query it looks at the result table and tries to find the values in the table in your sample tables.

I have never really liked SQL queries, it was always a necessary evil with web development. I only had to actually write SQL once in a blue moon(and wasn't very good at it). I knew what values I wanted the query to return but wasn't very sure what "join" I should be using or whether I was using some very inefficent query.

Back then I would have appreciated the tool I've created here, firstly just as a quick way to get the query I need without having to have an indept knowledge of SQL. Secondly as a learning a tool, it's great to be able to change the result set and see how the query changes.