Skip to content
This repository has been archived by the owner on Nov 20, 2017. It is now read-only.

Use Cases

kaspermarkus edited this page Nov 19, 2011 · 6 revisions

Count number and list people born in year

Description: Take a list of people with CPR (which holds year of birth) and names. The desired output is a listing of: year, the number of people born in that year, commaseparated list of names of the people.. people sorted by names and list sorted by year

Input: mySQL Database - [CPR (ddmmyy-xxxx), Name]

Output: Excel spreadsheet sorted by year - [year, #people, comma separated list of names born in that year]

Example: ["011280-xxxx", "kasper"], ["230681-zzzz", "arne"], ["141180-aaaa", "johnny"] -> [80, 2, "johnny, kasper"], [81, 1, "arne"]

Average page price/author

Description: take a two lists with info on book, author, price, etc. Calculate the average cost per page, and create list of authors, price/page

input: (1) csv - [bookID, title, price] (2) spreadsheet - [bookID, #pages, publishing year, author]

output: csv sorted by price per page - [price/page, authorname]

Example: INPUT: (1) [123, "Huckleberry Finn", 150], [456, "Invisible", 70], [789, "Pauper and the Prince", 200] (2) [123, 300, 1895, "Mark Twain"], [456, 210, 2002, "Paul Auster"], [789, 400, 1892, "Mark Twain"] OUTPUT: [0.33, "Paul Auster"], [0.50, "Mark Twain"]

Types of people

Description: Given (name, weight, height) create two tables:

(1) (title, height) Contains all people with height > 190, title should be "Tally "+name (2) (name, msg, details) contains all people weight < 50, where msg = "Skinny Person" and info = "weighs "+weight+" kg and is "+height+" cm tall"

Genderfied

Description: Given (name, gender) create (titulation, gender) where Titulation is name prefixed with "mr. " if gender is "m", else prefixed with "ms. "

Clone this wiki locally