SQL Export Function

Added SQL export to CSV  for most of graph and input types. Also added links at each graph linking to the export function.