Skip to content

Instantly share code, notes, and snippets.

@iocanel
Created October 6, 2016 14:03
Show Gist options
  • Save iocanel/fc58ccbb3a3bb789a182a54f7411de23 to your computer and use it in GitHub Desktop.
Save iocanel/fc58ccbb3a3bb789a182a54f7411de23 to your computer and use it in GitHub Desktop.
MySQL exception
org.mariadb.jdbc.internal.util.dao.QueryException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'zipkin.zipkin_spans.start_ts' which is not in SELECT list; this is incompatible with DISTINCT
Query is : select distinct `zipkin_spans`.`trace_id` from `zipkin_spans` join `zipkin_annotations` on (`zipkin_spans`.`trace_id` = `zipkin_annotations`.`trace_id` and `zipkin_spans`.`id` = `zipkin_annotations`.`span_id`) where (`zipkin_spans`.`start_ts` between 1475757274431000 and 1475760874431000 and `zipkin_annotations`.`endpoint_service_name` = 'helloworld') order by `zipkin_spans`.`start_ts` desc limit 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment