Index: /branches/eam_branches/ipp-20230313/ippTools/share/xcskytool_result.sql
===================================================================
--- /branches/eam_branches/ipp-20230313/ippTools/share/xcskytool_result.sql	(revision 42578)
+++ /branches/eam_branches/ipp-20230313/ippTools/share/xcskytool_result.sql	(revision 42579)
@@ -4,12 +4,12 @@
     xcskyRun.workdir,
     xcskyRun.label,
-    xcstackRun.tess_id,
-    xcstackRun.skycell_id,
+    MIN(xcstackRun.tess_id) as tess_id, -- we implicitly assume that all xcstackRuns used for a xcskyRun have the same tess_id
+    MIN(xcstackRun.skycell_id) as skycell_id, -- and skycell_id 
     count(xcstackRun.filter) AS num_filters,
-    TRUNCATE(skycell.radeg/15., 4) AS rahours,
-    skycell.radeg,
-    skycell.decdeg,
-    skycell.glong,
-    skycell.glat
+    TRUNCATE(MIN(skycell.radeg)/15., 4) as rahours,
+    MIN(skycell.radeg) as radeg,
+    MIN(skycell.decdeg) as decdeg,
+    MIN(skycell.glong) as glong,
+    MIN(skycell.glat) as glat
 FROM xcskyRun
 JOIN xcskyResult USING(xcsky_id)
Index: /branches/eam_branches/ipp-20230313/ippTools/share/xcskytool_todo.sql
===================================================================
--- /branches/eam_branches/ipp-20230313/ippTools/share/xcskytool_todo.sql	(revision 42578)
+++ /branches/eam_branches/ipp-20230313/ippTools/share/xcskytool_todo.sql	(revision 42579)
@@ -5,11 +5,11 @@
     xcskyRun.label,
     xcskyRun.state,
-    xcstackRun.tess_id,
-    xcstackRun.skycell_id,
-    TRUNCATE(skycell.radeg/15., 4) as rahours,
-    skycell.radeg,
-    skycell.decdeg,
-    skycell.glong,
-    skycell.glat,
+    MIN(xcstackRun.tess_id) as tess_id, -- we implicitly assume that all xcstackRuns used for a xcskyRun have the same tess_id
+    MIN(xcstackRun.skycell_id) as skycell_id, -- and skycell_id 
+    TRUNCATE(MIN(skycell.radeg)/15., 4) as rahours,
+    MIN(skycell.radeg) as radeg,
+    MIN(skycell.decdeg) as decdeg,
+    MIN(skycell.glong) as glong,
+    MIN(skycell.glat) as glat,
     xcskyResult.path_base,
     IFNULL(Label.priority, 10000) AS priority
Index: /branches/eam_branches/ipp-20230313/ippTools/src/xcskytool.c
===================================================================
--- /branches/eam_branches/ipp-20230313/ippTools/src/xcskytool.c	(revision 42578)
+++ /branches/eam_branches/ipp-20230313/ippTools/src/xcskytool.c	(revision 42579)
@@ -116,4 +116,5 @@
     PXOPT_LOOKUP_STR(note,        config->args, "-set_note", false, false);
     PXOPT_LOOKUP_TIME(registered, config->args, "-set_registered", false, false);
+    //    fprintf (stderr, "%s\n", registered);
 
     psMetadata *whereMD = psMetadataAlloc();
@@ -333,5 +334,5 @@
 				dist_group,
 				reduction,
-				registered,
+			    NULL, // XXX : broken like xcstacktool : is this due to the mysql version?
 				note
 		)
