You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"query": "MATCH path = (m:Model {name: $neodash_model_name})-[:HAS*]->(c:Component)\nWITH c.name AS name, c.price AS price, reduce(acc = 1, qty IN [r IN relationships(path)| r.count] | acc * qty) AS quantity\nRETURN name, round(price, 2) AS price, quantity, round(price*quantity, 2) AS total_price\nORDER BY total_price DESC\n\n\n",
141
+
"width": 6,
142
+
"type": "table",
143
+
"height": 2,
144
+
"selection": {},
145
+
"settings": {
146
+
"nodePositions": {}
147
+
}
148
+
}
149
+
]
150
+
},
151
+
{
152
+
"title": "Comparar Modelos",
153
+
"reports": [
154
+
{
155
+
"x": 0,
156
+
"y": 0,
157
+
"title": "Lista de Modelos",
158
+
"query": "MATCH (m:Model) RETURN m.name AS name",
159
+
"width": 3,
160
+
"type": "table",
161
+
"height": 2,
162
+
"selection": {},
163
+
"settings": {
164
+
"type": "Node Property",
165
+
"entityType": "Model",
166
+
"propertyType": "name",
167
+
"parameterName": "neodash_model_name"
168
+
}
169
+
},
170
+
{
171
+
"x": 3,
172
+
"y": 0,
173
+
"title": "Modelo 1",
174
+
"query": "MATCH (n:`Model`) \nWHERE toLower(toString(n.`name`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`name` as value LIMIT 5",
175
+
"width": 4,
176
+
"type": "select",
177
+
"height": 2,
178
+
"selection": {},
179
+
"settings": {
180
+
"type": "Node Property",
181
+
"entityType": "Model",
182
+
"propertyType": "name",
183
+
"parameterName": "neodash_model_name_1",
184
+
"id": "1"
185
+
}
186
+
},
187
+
{
188
+
"x": 7,
189
+
"y": 0,
190
+
"title": "Modelo 2",
191
+
"query": "MATCH (n:`Model`) \nWHERE toLower(toString(n.`name`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`name` as value LIMIT 5",
192
+
"width": 5,
193
+
"type": "select",
194
+
"height": 2,
195
+
"selection": {},
196
+
"settings": {
197
+
"type": "Node Property",
198
+
"entityType": "Model",
199
+
"propertyType": "name",
200
+
"parameterName": "neodash_model_name_2",
201
+
"id": "2"
202
+
}
203
+
},
204
+
{
205
+
"x": 7,
206
+
"y": 2,
207
+
"title": "Components en ambos",
208
+
"query": "MATCH (m:Model {name: $neodash_model_name_1})-[:HAS*]->(c:Component)\nWITH collect(c) as in_first\nMATCH (m2:Model {name: $neodash_model_name_2})-[:HAS*]->(c2:Component) WHERE c2 IN in_first\nRETURN c2.name AS component, c2.number AS ref\n\n\n",
209
+
"width": 5,
210
+
"type": "table",
211
+
"height": 2,
212
+
"selection": {},
213
+
"settings": {
214
+
"nodePositions": {}
215
+
}
216
+
},
217
+
{
218
+
"x": 0,
219
+
"y": 2,
220
+
"title": "Components en primero solo",
221
+
"query": "MATCH (m:Model {name: $neodash_model_name_2})-[:HAS*]->(c:Component)\nWITH collect(c) as in_first\nMATCH (m2:Model {name: $neodash_model_name_1})-[:HAS*]->(c2:Component) WHERE NOT c2 IN in_first\nRETURN c2.name AS component, c2.number AS ref\n\n\n",
222
+
"width": 4,
223
+
"type": "table",
224
+
"height": 2,
225
+
"selection": {},
226
+
"settings": {
227
+
"nodePositions": {}
228
+
}
229
+
},
230
+
{
231
+
"x": 4,
232
+
"y": 2,
233
+
"title": "Similaridad",
234
+
"query": "MATCH (m:Model {name: $neodash_model_name_1})-[:HAS*]->(c:Component)\nWITH collect(c) as in_first\nMATCH (m2:Model {name: $neodash_model_name_2})-[:HAS*]->(c2:Component) WHERE c2 IN in_first\nWITH in_first, count(c2) AS inter\nMATCH (m3:Model {name: $neodash_model_name_2})-[:HAS*]->(c3:Component)\nWITH size(in_first) - inter AS in_first, inter, size(collect(c3)) - inter as in_second\nWITH apoc.coll.zip([\"first only\", \"both\", \"second only\"], [in_first, inter, in_second]) AS l\nUNWIND l AS row\nRETURN row[0] AS name, row[1] AS cardinality\n\n\n",
0 commit comments