Filter
Exclude
Time range
-
Near
๐Ÿ”ฅ Todayโ€™s win: Set operations UNION | INTERSECT | EXCEPT Finally understand how to combine results from multiple queries like a real query composer ๐Ÿงฉ #SQLQuery #DataEngineering #100DaysOfCode
1
14
Day 10 of the @hertechtrail #HTTDataChallenge was to retrieve customer names in alphabetical order using SQL query. SELECT name (retrieves only the name column) FROM accounts (your customer names are in the accounts table) ORDER BY & ASC (sorts in ascending order ) #SQLQuery
1
1
32
8 days in spreadsheets was a good run, but I've officially moved the stack to SQL Managing an orders tables scale requires more than just filters. It requires data integrity and speed. Scaling upโœจ๐Ÿ’ซ๐Ÿ‘Œ๐Ÿผ #HTTDataChallengeDay9 #SQL #FMCG #DataAnalytics #SQLQuery
1
3
38
Iโ€™m early today๐Ÿ˜‚๐Ÿคญ Day 9 of the @hertechtrail #HTTDataChallenge task is to retrieve all column from any specific table I used the commands SELECT * FROM region; Result = 4 rows and 2 columns SELECT * FROM accounts; Result = 351 rows and 7 columns #SQLQuery #SQLBasics
1
4
22
Replying to @mjovanovictech
One thing worth knowing: SqlQuery<T> works for unmapped types, but if you need to query your actual mapped entities with raw SQL, use FromSql instead. They look similar but behave differently - FromSql participates in change tracking and respects your entity configuration, while SqlQuery<T> is purely for projection into arbitrary types.
2
150
Day 6 of Learning SQL Combining of Data (contd) Types of Joins No join โ€“ Returning Data from two tables without combining them, frame 1 shows an example on it. Inner Join โ€“ It returns only the matching rows from both tables, frame 2 shows an example on it. Left join- It returns all the rows from left and only the matching rows from the right table, frame 2 also shows an example on it . Right Join โ€“ It returns all the rows from the right table and only the matching rows from the left table frame 3 shows an example on it. Full Join - It returns all the rows for both tables, frame 3 also shows an example on it. #dataengineering #sqlquery
1
4
96
37
99
847
25,350
I'm feeling the same way RStudio ... allbookings = data.frame(sqlQuery(conn, q1)) Error: memory exhausted
3
399
Replying to @AntonMartyniuk
1- Dapper => Use ef-core SqlQuery<T> 2- Serilog => MS.Ext.Logging OpenTelemetry 3- Dapr => Aspire 4- TestContainers => Aspire 5- GraphQL => OData
3
147
With EF8, you can compose raw SQL queries and LINQ. The SqlQuery method returns an IQueryable, meaning you can call any LINQ method. The resulting SQL will be a nested query, which isn't ideal. However, the database can optimize this. What do you think about this EF feature?
7
8
108
5,555
18 Dec 2025
/* High-level logic never lies */ bool is_active = false; int records_affected = 0; SQLCONN db = sql_connect("SQLSERVER_CORE"); SQLQUERY q = sql_prepare( "SELECT trace_id, event_time " "FROM audit_log " "WHERE card_state = 'INACTIVE'" ); -->
1
4
161
Hello SQL fam ๐Ÿ‘‹, Iโ€™m currently deep into my data analyst job preparation and practicing as many real-world SQL and Python questions as I can. Hereโ€™s one I worked on today ๐Ÿ‘‡ Problem Statement :- Products table has three columns namely ProductID, Product and Category. Write a SQL query to interchange the ProductIDs for Products as shown in the desired output. #sql #sqlquery #dataanalytics #dataanalyst #learning #jobprep #sqlpractice #tech #LearningInPublic
10
6
43
5,680
๐Ÿญ๐Ÿฌ ๐—ฆ๐˜๐—ฒ๐—ฝ๐˜€ ๐˜๐—ผ ๐— ๐—ฎ๐—ธ๐—ฒ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—˜๐—™ ๐—–๐—ผ๐—ฟ๐—ฒ ๐—ค๐˜‚๐—ฒ๐—ฟ๐—ถ๐—ฒ๐˜€ ๐Ÿญ๐Ÿฌ๐˜… ๐—™๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ Most .NET developers don't realize this: EF doesn't limit your query performance โ€” it's limited by how you use it. If your API feels slow, your dashboards lag, or queries take seconds to load, you're likely missing these simple optimizations ๐Ÿ‘‡ ๐Ÿญ. ๐—”๐—ฑ๐—ฑ ๐——๐—ฎ๐˜๐—ฎ๐—ฏ๐—ฎ๐˜€๐—ฒ ๐—œ๐—ป๐—ฑ๐—ฒ๐˜…๐—ฒ๐˜€ EF Core doesn't automatically create indexes. Add them manually for columns used in WHERE, JOIN, and ORDER BY. โ†’ Use .HasIndex() in your entity configuration. โ†’ Create a manageable number of indexes ๐Ÿฎ. ๐—ข๐—ฝ๐˜๐—ถ๐—บ๐—ถ๐˜‡๐—ฒ ๐—ค๐˜‚๐—ฒ๐—ฟ๐˜† ๐—ฃ๐—ฟ๐—ผ๐—ท๐—ฒ๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€ Stop fetching full entities when you only need a few fields. โ†’ Use .Select() to return only what's required. โ†’ Smaller payloads = faster materialization and less memory usage. ๐Ÿฏ. ๐—จ๐˜€๐—ฒ ๐—”๐˜€๐—ก๐—ผ๐—ง๐—ฟ๐—ฎ๐—ฐ๐—ธ๐—ถ๐—ป๐—ด ๐—ณ๐—ผ๐—ฟ ๐—ฅ๐—ฒ๐—ฎ๐—ฑ-๐—ข๐—ป๐—น๐˜† ๐—ค๐˜‚๐—ฒ๐—ฟ๐—ถ๐—ฒ๐˜€ Tracked entities consume memory and CPU. โ†’ Add .AsNoTracking() for read-only queries. โ†’ Or set global QueryTrackingBehavior .NoTracking for read-only DbContexts. ๐Ÿฐ. ๐—Ÿ๐—ถ๐—บ๐—ถ๐˜ ๐—ก๐˜‚๐—บ๐—ฏ๐—ฒ๐—ฟ ๐—ผ๐—ณ ๐—ก๐—ฎ๐˜ƒ๐—ถ๐—ด๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ Too many .Include() calls can cause N 1 queries or massive joins. โ†’ Include only what's necessary. โ†’ Filter includes where possible ๐Ÿฑ. ๐—”๐˜ƒ๐—ผ๐—ถ๐—ฑ ๐—Ÿ๐—ฎ๐—ฟ๐—ด๐—ฒ ๐—œ๐—ก / ๐—–๐—ผ๐—ป๐˜๐—ฎ๐—ถ๐—ป๐˜€ ๐—™๐—ถ๐—น๐˜๐—ฒ๐—ฟ๐˜€ Huge Contains() lists generate slow SQL IN clauses. โ†’ Fetch IDs in smaller batches. โ†’ Or store filter data in a temporary table and join it instead. ๐Ÿฒ. ๐—จ๐˜€๐—ฒ ๐—ฃ๐—ฎ๐—ด๐—ถ๐—ป๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ณ๐—ผ๐—ฟ ๐—Ÿ๐—ฎ๐—ฟ๐—ด๐—ฒ ๐——๐—ฎ๐˜๐—ฎ๐˜€๐—ฒ๐˜๐˜€ Don't load thousands of records into memory. โ†’ Use .Skip() and .Take() for offset-based pagination. โ†’ Or switch to cursor-based pagination โ€” it's faster and index-friendly. ๐Ÿณ. ๐—จ๐˜€๐—ฒ ๐—–๐—ผ๐—บ๐—ฝ๐—ถ๐—น๐—ฒ๐—ฑ ๐—ค๐˜‚๐—ฒ๐—ฟ๐—ถ๐—ฒ๐˜€ Frequent queries can be precompiled. โ†’ Cache LINQ-to-SQL translation with EF .CompileQuery(). โ†’ It's perfect for queries used in loops or called often. ๐Ÿด. ๐—จ๐˜€๐—ฒ ๐—ฆ๐—ฝ๐—น๐—ถ๐˜๐—ค๐˜‚๐—ฒ๐—ฟ๐˜† ๐˜๐—ผ ๐—”๐˜ƒ๐—ผ๐—ถ๐—ฑ ๐—–๐—ฎ๐—ฟ๐˜๐—ฒ๐˜€๐—ถ๐—ฎ๐—ป ๐—˜๐˜…๐—ฝ๐—น๐—ผ๐˜€๐—ถ๐—ผ๐—ป Multiple .Include() joins can cause data duplication. โ†’ Add .AsSplitQuery() to break large joins into smaller queries. โ†’ Ideal for complex relationships (Author โ†’ Books โ†’ Publisher). ๐Ÿต. ๐—จ๐˜€๐—ฒ ๐—ฅ๐—ฎ๐˜„ ๐—ฆ๐—ค๐—Ÿ ๐—ณ๐—ผ๐—ฟ ๐—–๐—ผ๐—บ๐—ฝ๐—น๐—ฒ๐˜… ๐—ข๐—ฝ๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ Sometimes SQL just wins. โ†’ For complex filtering, locking, or joins โ€” use .FromSqlRaw() or .SqlQuery<T>(). โ†’ You get full control over the query plan. ๐Ÿญ๐Ÿฌ. ๐—œ๐—ป๐˜๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐—ฒ ๐—–๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ด Don't hit the database for frequently accessed data. โ†’ Use in-memory cache or Redis. โ†’ For .NET 9 , try HybridCache โ€” it solves cache stampede issues. ๐Ÿ“Œ Bonus Tip: Measure before optimizing. Use BenchmarkDotNet, SQL Profiler, or query plans to confirm your bottlenecks. ๐Ÿ‘‰ Join ๐Ÿญ๐Ÿณ,๐Ÿฌ๐Ÿฌ๐Ÿฌ software engineers reading the best EF Core blogs on the market: antondevtips.com/blog?categoโ€ฆ โ€”โ€” โ™ป๏ธ Repost to help others optimize EF Core โž• Follow me ( @AntonMartyniuk ) to improve your .NET Skills
8
23
130
4,743
I dove into the data to uncover some key insights: ๐Ÿ”น Identified the count of female users from Canada. ๐Ÿ”นDiscovered the most common occupation among all users. ๐Ÿ”นListed the 5 oldest users in the system. #DataAnalytics #SQLQuery #UserDemographics #LearningInPublic
6
2
34
๐Ÿ’ฅ EF Core vs SQL Injection Cuando ejecutas SQL directo desde Entity Framework Core, la seguridad depende totalmente del mรฉtodo que elijas ๐Ÿ˜ฌ โœ… Primer ejemplo โ€” Seguro y recomendado ๐Ÿงฉ Interpolaciรณn segura (SqlQuery) EF Core convierte automรกticamente tus variables en parรกmetros SQL seguros. ๐Ÿ›ก๏ธ Esto evita inyecciones y protege tu base de datos sin esfuerzo. โš™๏ธ Ideal para la mayorรญa de los escenarios donde necesitas ejecutar SQL personalizado. โœ… Segundo ejemplo โ€” Correcto con precauciรณn ๐Ÿ’ฌ Uso de SqlQueryRaw con parรกmetros explรญcitos EF Core ejecuta SQL โ€œen crudoโ€, pero tรบ defines los parรกmetros de forma segura (@param). ๐Ÿ”’ Asรญ previenes inyecciones sin perder flexibilidad. ๐Ÿ’ก Perfecto cuando necesitas control total sobre la consulta. โŒ Tercer ejemplo โ€” Inseguro y peligroso ๐Ÿงจ Concatenar valores directamente en SQL Esto abre la puerta a ataques de SQL Injection, permitiendo que un atacante modifique la consulta para acceder o eliminar datos. ๐Ÿšซ Nunca construyas tu SQL con strings concatenados. ๐Ÿ”ฅ Este error es mรกs comรบn de lo que creesโ€ฆ ยกy el mรกs costoso! ๐Ÿ” Conclusiรณn: โœจ Usa SqlQuery siempre que sea posible. โš™๏ธ Si usas SqlQueryRaw, nunca concatene strings: pรกsalos como parรกmetros. ๐Ÿ’ก Recuerda: la seguridad no es opcional, ยกes parte del diseรฑo! Tu base de datos (y tu equipo de seguridad) te lo agradecerรกn ๐Ÿ˜‰ #EntityFrameworkCore #dotnet #Security #SQLInjection #CleanCode #NetUniversity #CSharp #Developers #CodingTips
3
121
14 Sep 2025
Will adding comments to Teradata tables impress my tables or just confuse them more? Source: devhubby.com/thread/how-to-aโ€ฆ #TechTips #SQLQuery #DatabaseTips #DataAdministration #exist #comments
4
8
55
Hi Folks Which condition returns rows where manager_id is empty? . . #sql #sqlquery #dataanalyst #follow @bkarishma360 for me more....
2
15