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
// SELECT amount, FORMAT(amount) Amt, convertCurrency(amount) editDate, FORMAT(convertCurrency(amount)) convertedCurrency FROM Opportunity where id = '12345'
12
-
// SELECT FORMAT(MIN(closedate)) Amt FROM opportunity
11
+
// SELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Opportunity WHERE StageName = 'Closed Lost')
12
+
// SELECT Id FROM Account WHERE Id NOT IN (SELECT AccountId FROM Opportunity WHERE IsClosed = false)
13
+
// SELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE LastName LIKE 'apple%') AND Id IN (SELECT AccountId FROM Opportunity WHERE isClosed = false)
Copy file name to clipboardExpand all lines: docs/src/components/sample-queries.tsx
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,22 @@ export default class SampleQueries extends React.Component<ISampleQueriesProps,
166
166
soql: `SELECT amount, FORMAT(amount) Amt, convertCurrency(amount) editDate, FORMAT(convertCurrency(amount)) convertedCurrency FROM Opportunity where id = '12345'`,
167
167
},
168
168
{key: 39,num: 39,soql: `SELECT FORMAT(MIN(closedate)) Amt FROM opportunity`},
169
+
{key: 40,num: 40,soql: `SELECT Company, toLabel(Status) FROM Lead WHERE toLabel(Status) = 'le Draft'`},
170
+
{
171
+
key: 41,
172
+
num: 41,
173
+
soql: `SELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Opportunity WHERE StageName = 'Closed Lost')`,
174
+
},
175
+
{
176
+
key: 42,
177
+
num: 42,
178
+
soql: `SELECT Id FROM Account WHERE Id NOT IN (SELECT AccountId FROM Opportunity WHERE IsClosed = false)`,
179
+
},
180
+
{
181
+
key: 43,
182
+
num: 43,
183
+
soql: `SELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE LastName LIKE 'apple%') AND Id IN (SELECT AccountId FROM Opportunity WHERE isClosed = false)`,
soql: `SELECT Company, toLabel(Status) FROM Lead WHERE toLabel(Status) = 'le Draft'`,
1281
+
output: {
1282
+
fields: [
1283
+
{
1284
+
text: 'Company',
1285
+
},
1286
+
{
1287
+
fn: {
1288
+
text: 'toLabel(Status)',
1289
+
name: 'toLabel',
1290
+
parameter: 'Status',
1291
+
},
1292
+
},
1293
+
],
1294
+
subqueries: [],
1295
+
sObject: 'Lead',
1296
+
where: {
1297
+
left: {
1298
+
operator: '=',
1299
+
value: "'le Draft'",
1300
+
fn: {
1301
+
text: 'toLabel(Status)',
1302
+
name: 'toLabel',
1303
+
parameter: 'Status',
1304
+
},
1305
+
},
1306
+
},
1307
+
},
1308
+
},
1309
+
{
1310
+
testCase: 47,
1311
+
soql: `SELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Opportunity WHERE StageName = 'Closed Lost')`,
1312
+
output: {
1313
+
fields: [
1314
+
{
1315
+
text: 'Id',
1316
+
},
1317
+
{
1318
+
text: 'Name',
1319
+
},
1320
+
],
1321
+
subqueries: [],
1322
+
sObject: 'Account',
1323
+
where: {
1324
+
left: {
1325
+
field: 'Id',
1326
+
operator: 'IN',
1327
+
valueQuery: {
1328
+
fields: [
1329
+
{
1330
+
text: 'AccountId',
1331
+
},
1332
+
],
1333
+
subqueries: [],
1334
+
sObject: 'Opportunity',
1335
+
where: {
1336
+
left: {
1337
+
field: 'StageName',
1338
+
operator: '=',
1339
+
value: "'Closed Lost'",
1340
+
},
1341
+
},
1342
+
},
1343
+
},
1344
+
},
1345
+
},
1346
+
},
1347
+
{
1348
+
testCase: 48,
1349
+
soql: `SELECT Id FROM Account WHERE Id NOT IN (SELECT AccountId FROM Opportunity WHERE IsClosed = false)`,
1350
+
output: {
1351
+
fields: [
1352
+
{
1353
+
text: 'Id',
1354
+
},
1355
+
],
1356
+
subqueries: [],
1357
+
sObject: 'Account',
1358
+
where: {
1359
+
left: {
1360
+
field: 'Id',
1361
+
operator: 'NOT IN',
1362
+
valueQuery: {
1363
+
fields: [
1364
+
{
1365
+
text: 'AccountId',
1366
+
},
1367
+
],
1368
+
subqueries: [],
1369
+
sObject: 'Opportunity',
1370
+
where: {
1371
+
left: {
1372
+
field: 'IsClosed',
1373
+
operator: '=',
1374
+
value: 'false',
1375
+
},
1376
+
},
1377
+
},
1378
+
},
1379
+
},
1380
+
},
1381
+
},
1382
+
{
1383
+
testCase: 49,
1384
+
soql: `SELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE LastName LIKE 'apple%') AND Id IN (SELECT AccountId FROM Opportunity WHERE isClosed = false)`,
0 commit comments