Section one: Create a temporary table

import java.nio.charset.Charset
// Zeppelin creates and injects sc (SparkContext) and sqlContext (HiveContext or SqlContext)
// So you don't need create them manually
// load bank data
val bankText = sc.parallelize(
        new URL(""),
case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)
val bank = => s.split(";")).filter(s => s(0) ! = "\"age\"").map(
    s => Bank(s(0).toInt, 
            s(1).replaceAll("\"", ""),
            s(2).replaceAll("\"", ""),
            s(3).replaceAll("\"", ""),
            s(5).replaceAll("\"", "").toInt

Section two: Query the table structure

desc bank

Section three: Query the number of employees of each age group below 30

%sql select age, count(1) value from bank where age < 30 group by age order by age

Section 4: Query the information of employees at the age less than or equal to 20

%sql select * from bank where age <= 20