Skip to content

Instantly share code, notes, and snippets.

@xoebus
Created February 29, 2012 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xoebus/1940608 to your computer and use it in GitHub Desktop.
Save xoebus/1940608 to your computer and use it in GitHub Desktop.
sdg
grades_table = Table :grades
students_table = Table :students
students_table_grades_table_join = join(students_table, grades_table, :_id, :student_id)
students_table_grades_table_join_select = select(students_table_grades_table_join, '*')
students_table_grades_table_join_select_filter = where(students_table_grades_table_join_select, students_table[:matric].eq('0824586'))
students_table_grades_table_join_select_filter_order = order(students_table_grades_table_join_select_filter, grades_table[:mark])
students_table_grades_table_join_select_filter_order_limit = limit(students_table_grades_table_join_select_filter_order, 1)
Output students_table_grades_table_join_select_filter_order_limit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment