cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to show column value of array type in one row

My query is :

OPTIONAL MATCH(dftAptFtr:AppFeatureGroup{englishName:"Default"})
OPTIONAL MATCH (:User{id:"cjkqrbgkg04oa0a33g2rgtmxf"})-[:PURCHASED{isExpired:0}]-(smnrPlusFtr:AppFeatureGroup{isActive:1})
OPTIONAL MATCH (trb:TeacherRedeemBatch)-[:HAS_APP_FTR_GRP]->(trbSmnrPlusFtr:AppFeatureGroup{isActive:1}) where ID(trb) in [16985,16988,15675,15315]
OPTIONAL MATCH (srb:StudentRedeemBatch)-[:HAS_APP_FTR_GRP]->(srbSsmnrPlusFtr:AppFeatureGroup{isActive:1}) where ID(srb) in [52028]
WITH distinct
[COALESCE(dftAptFtr.id,''),COALESCE(smnrPlusFtr.id,''),COALESCE(trbSmnrPlusFtr.id,''),COALESCE(srbSsmnrPlusFtr.id,'')] AS appFeatureGroupIds,
apoc.convert.toInteger(COALESCE(trb.isPublicExportEnabled, 0)+COALESCE(srb.isPublicExportEnabled, 0) > 0) AS isPublicExportEnabled,
apoc.coll.max([COALESCE(dftAptFtr.privateExportsPerDay,0),COALESCE(smnrPlusFtr.privateExportsPerDay,0),COALESCE(trbSmnrPlusFtr.privateExportsPerDay,0),COALESCE(srbSsmnrPlusFtr.privateExportsPerDay,0)]) AS privateExportsPerDay,
apoc.coll.max([COALESCE(dftAptFtr.exportsPerDay,0),COALESCE(smnrPlusFtr.exportsPerDay,0),COALESCE(trbSmnrPlusFtr.exportsPerDay,0),COALESCE(srbSsmnrPlusFtr.exportsPerDay,0)]) AS exportsPerDay

return
appFeatureGroupIds,
isPublicExportEnabled,
privateExportsPerDay,
exportsPerDay

i want to show first column all values in one row.

Thanks

1 REPLY 1

Without going to deep in your query I would suggest to modify appFeatureGroupIds after your return clause by this: collect(appFeatureGroupIds)

The result may vary depending on your model context but its a good start.