name the tv show whose cast member is andy griffith and is related to the danny thomas show ?
SELECT DISTINCT var_uri where brack_open var_uri dbo_starring dbr_Andy_Griffith sep_dot var_uri dbo_related dbr_The_Danny_Thomas_Show sep_dot var_uri a dbo_TelevisionShow brack_close