# \#sql

**URL:** https://discuss.google.dev/tag/sql/233.md

[Latest](https://discuss.google.dev/latest.md) · [Categories](https://discuss.google.dev/categories.md) · [Tags](https://discuss.google.dev/tags.md)

---

## [SQL Server Connection Form is missing Fields](https://discuss.google.dev/t/sql-server-connection-form-is-missing-fields/293767)

<div class="topic-metadata">

**Author:** [@Judy\_Adabie](https://discuss.google.dev/u/Judy_Adabie)\
**Replies:** 12\
**Last updated:** [April 22, 2026, 8:07pm UTC](https://discuss.google.dev/t/sql-server-connection-form-is-missing-fields/293767 "2026-04-22T20:07:53Z")

</div>

The SQL Connector is broken. The field to input the server is missing, and the other fields do not display properly. The button is blank, and the reconnect button is missing.

---

## [IF statement Not working properly while using in calculated fields](https://discuss.google.dev/t/if-statement-not-working-properly-while-using-in-calculated-fields/320096)

<div class="topic-metadata">

**Author:** [@g\_t](https://discuss.google.dev/u/g_t)\
**Replies:** 2\
**Last updated:** [April 13, 2026, 6:19am UTC](https://discuss.google.dev/t/if-statement-not-working-properly-while-using-in-calculated-fields/320096 "2026-04-13T06:19:52Z")

</div>

Everytime i adding some some in calculated file d using IF statement it shows. Even my paranthesis are appropriate in no.

---

## [Connecting PostgreSQL to Looker](https://discuss.google.dev/t/connecting-postgresql-to-looker/341174)

<div class="topic-metadata">

**Author:** [@sergio.vargas](https://discuss.google.dev/u/sergio.vargas)\
**Replies:** 1\
**Last updated:** [March 18, 2026, 6:12pm UTC](https://discuss.google.dev/t/connecting-postgresql-to-looker/341174 "2026-03-18T18:12:36Z")

</div>

Hello, I’m currently trying to add a new data source using the PostgreSQL connector. The database I want to connect to is accessed via a bastion host EC2 instance on AWS. I’m able to access the database from my computer…

---

## [Cross-Granularity Calculations in Looker](https://discuss.google.dev/t/cross-granularity-calculations-in-looker/324903)

<div class="topic-metadata">

**Author:** [@michael123](https://discuss.google.dev/u/michael123)\
**Replies:** 2\
**Last updated:** [January 28, 2026, 8:43am UTC](https://discuss.google.dev/t/cross-granularity-calculations-in-looker/324903 "2026-01-28T08:43:19Z")

</div>

Purpose: Implementing cross-granularity calculations in Looker is similar to working with “level of detail” calculations in Tableau, leveraging DAX filter functions in Microsoft PowerBI or using metric dimensionality in …

---

## [Sort Order parameter in Looker ML](https://discuss.google.dev/t/sort-order-parameter-in-looker-ml/265808)

<div class="topic-metadata">

**Author:** [@betix](https://discuss.google.dev/u/betix)\
**Replies:** 2\
**Last updated:** [October 17, 2025, 7:10am UTC](https://discuss.google.dev/t/sort-order-parameter-in-looker-ml/265808 "2025-10-17T07:10:22Z")

</div>

Hello all! So I’m trying to do some logic in Looker ML. I have a visualization of type: marketplace\_viz\_report\_table::report\_table-marketplace and here I have some fields that I want to see in my viz. Also I have filter…

---

## [A Complete Guide to Gross Margin Variance Analysis](https://discuss.google.dev/t/a-complete-guide-to-gross-margin-variance-analysis/273444)

<div class="topic-metadata">

**Author:** [@gdemontalivet](https://discuss.google.dev/u/gdemontalivet)\
**Replies:** 0\
**Last updated:** [October 14, 2025, 9:51am UTC](https://discuss.google.dev/t/a-complete-guide-to-gross-margin-variance-analysis/273444 "2025-10-14T09:51:57Z")

</div>

Recently, I ran into a calculation I had never seen before which is called gross margin (profit) analysis using matching pairs, or “Like for Like” analysis. In case you are not a financial controller, here is an explanat…

---

## [Help with combined data source](https://discuss.google.dev/t/help-with-combined-data-source/172443)

<div class="topic-metadata">

**Author:** [@FelipeMendes](https://discuss.google.dev/u/FelipeMendes)\
**Replies:** 1\
**Last updated:** [February 21, 2025, 7:22pm UTC](https://discuss.google.dev/t/help-with-combined-data-source/172443 "2025-02-21T19:22:43Z")

</div>

Hi everyone, how are you? I have a question and I hope to find help here! I’m creating a BI in Data Studio and I’ve run into a problem. I use Google Spreadsheets as a database. In this case, for this data set, I have …

---

## [Keyword Labeling](https://discuss.google.dev/t/keyword-labeling/146825)

<div class="topic-metadata">

**Author:** [@kimvandijk99](https://discuss.google.dev/u/kimvandijk99)\
**Replies:** 1\
**Last updated:** [December 19, 2024, 6:53pm UTC](https://discuss.google.dev/t/keyword-labeling/146825 "2024-12-19T18:53:14Z")

</div>

Hi! I want to label Google Search Console keywords in Google Looker Studio. I tried doing to do so using a CASE as well as an IF function: CASE WHEN Average Position \<= 10 THEN “High Ranking” WHEN Average Position \<= …

---

## [Announcing a New Primer: LookML for SQL Experts](https://discuss.google.dev/t/announcing-a-new-primer-lookml-for-sql-experts/168699)

<div class="topic-metadata">

**Author:** [@Dr\_Strangelove](https://discuss.google.dev/u/Dr_Strangelove)\
**Replies:** 0\
**Last updated:** [October 2, 2024, 10:39pm UTC](https://discuss.google.dev/t/announcing-a-new-primer-lookml-for-sql-experts/168699 "2024-10-02T22:39:12Z")

</div>

In the 40+ years that relational databases have been around, Structured Query Language (SQL) has remained the standard way to query and manipulate data. SQL has withstood the test of time. No proposal to replace SQL h…

---

## [Using Looker’s SQL Generator](https://discuss.google.dev/t/using-looker-s-sql-generator/168665)

<div class="topic-metadata">

**Author:** [@Dr\_Strangelove](https://discuss.google.dev/u/Dr_Strangelove)\
**Replies:** 0\
**Last updated:** [October 2, 2024, 6:27pm UTC](https://discuss.google.dev/t/using-looker-s-sql-generator/168665 "2024-10-02T18:27:06Z")

</div>

With Looker, you use LookML to model your database both in a structured and reusable way, and in a way that governs the integrity of your data. When your users run a query in a Looker Explore, Looker generates the nec…

---

## [i Want to manipulate "period Control" filter in my looker studio](https://discuss.google.dev/t/i-want-to-manipulate-period-control-filter-in-my-looker-studio/148305)

<div class="topic-metadata">

**Author:** [@ViniciusC](https://discuss.google.dev/u/ViniciusC)\
**Replies:** 0\
**Last updated:** [March 11, 2024, 9:44pm UTC](https://discuss.google.dev/t/i-want-to-manipulate-period-control-filter-in-my-looker-studio/148305 "2024-03-11T21:44:19Z")

</div>

I have a report and need to be able to manipulate the value of the “Date Range Control” field. I need to get something like “Start\_Date” and “End\_Date” and send those values in a query that I will perform on a BigQuery t…

---

## [Calculate Standard Deviation and Percentiles by Country](https://discuss.google.dev/t/calculate-standard-deviation-and-percentiles-by-country/111604)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 2\
**Last updated:** [March 7, 2024, 2:05pm UTC](https://discuss.google.dev/t/calculate-standard-deviation-and-percentiles-by-country/111604 "2024-03-07T14:05:52Z")

</div>

How can I get a table where I can see the country code, the count of accounts created and the standard deviation, 75th percentile, 25th percentile by country? I have been trying to do it but I can´t for the life of me g…

---

## [Hierarchical Filters](https://discuss.google.dev/t/hierarchical-filters/113186)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 2\
**Last updated:** [October 23, 2023, 6:14pm UTC](https://discuss.google.dev/t/hierarchical-filters/113186 "2023-10-23T18:14:53Z")

</div>

Hello I have a question about having filters affect the results you see in other filters inside of Looker. So far I’ve been trying without success, but in short, I am trying to do the following: I have the following hie…

---

## [Group based on AND condition](https://discuss.google.dev/t/group-based-on-and-condition/114583)

<div class="topic-metadata">

**Author:** [@SBH38](https://discuss.google.dev/u/SBH38)\
**Replies:** 2\
**Last updated:** [July 12, 2023, 7:23pm UTC](https://discuss.google.dev/t/group-based-on-and-condition/114583 "2023-07-12T19:23:00Z")

</div>

Hello all. First of all, love the new GROUP feature in Looker. Super helpful. I have a question about it though. Per the image below, I’m looking to group URLs into one bucket. Let’s say there are pages of a site that h…

---

## [SSH and Remote Host Port when using SSH tunnel](https://discuss.google.dev/t/ssh-and-remote-host-port-when-using-ssh-tunnel/116995)

<div class="topic-metadata">

**Author:** [@nbauer](https://discuss.google.dev/u/nbauer)\
**Replies:** 2\
**Last updated:** [June 2, 2023, 6:23pm UTC](https://discuss.google.dev/t/ssh-and-remote-host-port-when-using-ssh-tunnel/116995 "2023-06-02T18:23:47Z")

</div>

Here is our use case. We are using SQL Server and clients are distributed across multiple SQL Server instances We only want to maintain one version of our LookML code (connection string in the model does not change) Fo…

---

## [Can users define group by clause in explore?](https://discuss.google.dev/t/can-users-define-group-by-clause-in-explore/116115)

<div class="topic-metadata">

**Author:** [@sabrina\_z](https://discuss.google.dev/u/sabrina_z)\
**Replies:** 1\
**Last updated:** [May 10, 2023, 3:08am UTC](https://discuss.google.dev/t/can-users-define-group-by-clause-in-explore/116115 "2023-05-10T03:08:21Z")

</div>

Hi, I want to create the following query in looker: SELECT \_\_\_\_\_\_\_, COUNT(\*) FROM MEMBER GROUP BY \_\_\_\_\_ In the code \_\_\_ represents what users can customize. For instance, users can choose to group by member stat…

---

## [REPLACE Characters in string filters](https://discuss.google.dev/t/replace-characters-in-string-filters/119463)

<div class="topic-metadata">

**Author:** [@LookerExperts](https://discuss.google.dev/u/LookerExperts)\
**Replies:** 2\
**Last updated:** [May 9, 2023, 8:29pm UTC](https://discuss.google.dev/t/replace-characters-in-string-filters/119463 "2023-05-09T20:29:08Z")

</div>

Knowledge Drop Last tested: Jul 30, 2019 If you see odd results in a drill’s filter string, it may be that the strings content has a character that Looker is trying to escape. Characters like - Looker is trying to esc…

---

## [Merge result like a model?](https://discuss.google.dev/t/merge-result-like-a-model/111737)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 1\
**Last updated:** [April 25, 2023, 10:42pm UTC](https://discuss.google.dev/t/merge-result-like-a-model/111737 "2023-04-25T22:42:32Z")

</div>

Could I consume a merge result like a model? I want to hide the key dimension of the visual and group by another dimension, i.e I dont need the key dimension. Pd, I am only explore user.

---

## [PDT trigger value at a specific time and day of week, once a week](https://discuss.google.dev/t/pdt-trigger-value-at-a-specific-time-and-day-of-week-once-a-week/119427)

<div class="topic-metadata">

**Author:** [@LookerExperts](https://discuss.google.dev/u/LookerExperts)\
**Replies:** 2\
**Last updated:** [March 16, 2023, 8:50pm UTC](https://discuss.google.dev/t/pdt-trigger-value-at-a-specific-time-and-day-of-week-once-a-week/119427 "2023-03-16T20:50:39Z")

</div>

Knowledge Drop Last Tested: Mar 22, 2021 This trigger changes weekly at 6 am on Monday: MSSQL: SELECT FLOOR((DATEDIFF(s, '1970-01-01 00:00:00', GETUTCDATE()) - 60\*60\*(24\*4 + 6))/(60\*60\*24\*7)) Postgres: SELECT FLOOR((…

---

## [Is it possible to create conditional formatting for a daily deadline in time?](https://discuss.google.dev/t/is-it-possible-to-create-conditional-formatting-for-a-daily-deadline-in-time/114609)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 0\
**Last updated:** [March 10, 2023, 4:35pm UTC](https://discuss.google.dev/t/is-it-possible-to-create-conditional-formatting-for-a-daily-deadline-in-time/114609 "2023-03-10T16:35:21Z")

</div>

I would like my dashboard to highlight items and tell me if a certain time is met on a daily basis. Does anyone have any experience with this?

---

## [How to create a calculated field which is customized based on filter selection?](https://discuss.google.dev/t/how-to-create-a-calculated-field-which-is-customized-based-on-filter-selection/114455)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 0\
**Last updated:** [February 8, 2023, 2:03pm UTC](https://discuss.google.dev/t/how-to-create-a-calculated-field-which-is-customized-based-on-filter-selection/114455 "2023-02-08T14:03:05Z")

</div>

Hi there, I have created a custom drop-down list (using CASE WHEN formula) which groups campaigns together based on the country where they are present. However, now I would like to create a custom statement for each sele…

---

## [Use SQL like operator on the filter expression with Looker API](https://discuss.google.dev/t/use-sql-like-operator-on-the-filter-expression-with-looker-api/115179)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 0\
**Last updated:** [February 1, 2023, 2:43pm UTC](https://discuss.google.dev/t/use-sql-like-operator-on-the-filter-expression-with-looker-api/115179 "2023-02-01T14:43:11Z")

</div>

I’m trying to access Looker explore via Looker API (using python) with the below filter expression: \> \*{‘browser\_\_page\_url' : "^%www.abcd.com^%"}\*\> and getting error 500 the syntax should be equivalent to the below…

---

## ["Filtering is not supported on SQL tiles"](https://discuss.google.dev/t/filtering-is-not-supported-on-sql-tiles/114288)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 0\
**Last updated:** [January 11, 2023, 10:37pm UTC](https://discuss.google.dev/t/filtering-is-not-supported-on-sql-tiles/114288 "2023-01-11T22:37:52Z")

</div>

Hey there! As the title suggests, I saw the following message while editing filters for a dashboard: “Filtering is not supported on SQL tiles” I honestly have no idea what it is referring to, since I don’t know what S…

---

## [Subtracting two date time](https://discuss.google.dev/t/subtracting-two-date-time/111575)

<div class="topic-metadata">

**Author:** [@honghai\_sg99-16](https://discuss.google.dev/u/honghai_sg99-16)\
**Replies:** 1\
**Last updated:** [January 9, 2023, 3:01am UTC](https://discuss.google.dev/t/subtracting-two-date-time/111575 "2023-01-09T03:01:28Z")

</div>

Hi everyone I got an issue, How can I subtract the arrival and depart (date\_time) in to deviation (hours) and extract it to difference. I have done the deviation by using this: case(\> when(diff\_days(${arrival}, ${dep…

---

## [Concatenete values](https://discuss.google.dev/t/concatenete-values/111569)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 2\
**Last updated:** [December 29, 2022, 11:21am UTC](https://discuss.google.dev/t/concatenete-values/111569 "2022-12-29T11:21:41Z")

</div>

Hi, I would like to know how can I create a new field which will concatenete x values (area code) into one string value. Example: In example above, I would like to have a new field named “Parking Group” where we I can…

---

## [Looker instance Slowness](https://discuss.google.dev/t/looker-instance-slowness/117327)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 1\
**Last updated:** [December 24, 2022, 6:20am UTC](https://discuss.google.dev/t/looker-instance-slowness/117327 "2022-12-24T06:20:26Z")

</div>

Hi Everyone! I am hoping for some guidance on my Looker instances slowness as well as some best practices from fellow Ops folks who support Looker. Our looker instance is, and has been for some time, crazy slow. By slow…

---

## [How to create flexible GROUP BY on LookML](https://discuss.google.dev/t/how-to-create-flexible-group-by-on-lookml/115913)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 0\
**Last updated:** [December 1, 2022, 4:32am UTC](https://discuss.google.dev/t/how-to-create-flexible-group-by-on-lookml/115913 "2022-12-01T04:32:57Z")

</div>

This is the function generated in SQL, I want to include c.bkg\_no, c.cntr\_no, c.cntr\_tpsz\_cdm on GROUP BY below but I can’t do this because this GROUP BY is generated automatically. I cannot do this either because it’s …

---

## [datetime\_diff in looker syntax](https://discuss.google.dev/t/datetime-diff-in-looker-syntax/113826)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 0\
**Last updated:** [November 18, 2022, 4:35pm UTC](https://discuss.google.dev/t/datetime-diff-in-looker-syntax/113826 "2022-11-18T16:35:49Z")

</div>

DATETIME\_DIFF(checkout, checkout, HOUR) Why does an error occur when I want to try this in looker data studio by google

---

## [BigQuery Join Google Analytics Datasets for Looker Reports](https://discuss.google.dev/t/bigquery-join-google-analytics-datasets-for-looker-reports/114001)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 0\
**Last updated:** [October 21, 2022, 5:12am UTC](https://discuss.google.dev/t/bigquery-join-google-analytics-datasets-for-looker-reports/114001 "2022-10-21T05:12:46Z")

</div>

We have several websites (same website but different topleveldomains) and store the GA360 data in BigQuery. The GA360 data for each website is stored in the same BigQuery project but in a different dataset (date partitio…

---

## [Looker Filter that can evaluate to more than one condition](https://discuss.google.dev/t/looker-filter-that-can-evaluate-to-more-than-one-condition/113952)

<div class="topic-metadata">

**Author:** [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Replies:** 1\
**Last updated:** [October 11, 2022, 12:15am UTC](https://discuss.google.dev/t/looker-filter-that-can-evaluate-to-more-than-one-condition/113952 "2022-10-11T00:15:21Z")

</div>

I’m trying to create a filter for my dashboard. I need the filter to be able to evaluate to more than one condition. For example, my logic can look like the following: case when account\_age \< 1 then 'populate new acco…

[Next page](https://discuss.google.dev/tag/sql/233.md?match_all_tags=true&page=1&tags%5B%5D=sql)
