【问题标题】:My QUERY google sheet function does'nt work?我的 QUERY google sheet 功能不起作用?
【发布时间】:2021-12-11 19:04:04
【问题描述】:

这是我的谷歌表格中使用的查询:

=QUERY(control!A1:AF; "SELECT G, SUM(I), MIN(L), MIN(K), SUM(P), SUM(P)/SUM(Y), SUM(Y), SUM(Y)/"&credit!$B$10&" WHERE A='open' GROUP BY G ORDER BY SUM(Y) DESC LABEL SUM(I) 'shares', MIN(L) 'avg_price', MIN(K) 'current_price', SUM(P) 'net_PL_open', SUM(Y) 'cost', SUM(P)/SUM(Y) 'net_PL_%', SUM(Y)/"&credit!$B$10&" 'invest_%'";1)

上面的QUERY出现错误:

“Não foi possível analisar a string de Consulta para Função QUERY parâmetro 2: PARSE_ERROR: Encountered "",", "" at line 1, column 271. 期待以下之一: ...“*” ... "+" ... "-" ... "/" ... "%" ..."

知道哪里出了问题吗?

【问题讨论】:

    标签: google-sheets-formula formula


    【解决方案1】:

    尝试:

    ={"rewrite this"\ "shares"\ "avg_price"\ "current_price"\ 
      "net_PL_open"\ "net_PL_%"\ "cost"\ "invest_%"; 
     QUERY(QUERY(control!A1:AF; 
     "select G,sum(I),min(L),min(K),sum(P),sum(P)/sum(Y),sum(Y),sum(Y)/"&credit!B10&" 
      where A='open' 
      group by G 
      order by sum(Y) desc"); "offset 1"; 0)}
    

    【讨论】:

      猜你喜欢
      • 2022-11-01
      • 1970-01-01
      • 2020-05-13
      • 2019-01-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多