SQL - any and all
-
What are your thoughts on when to use LAST_VALUE() vs. MAX() KEEP(DENSE_RANK LAST ... )
I had an interesting conversation at work where someone questioned my use of DENSE_RANK and suggested I use LAST_VALUE. We had a good conversation about it, but ultimately agreed to disagree about the specific scenario. My code was accurate with no performance issues warranting a rewrite. My feeling was the person I was talking too was less familiar with DENSE_RANK and so favored LAST_VALUE. I get preference, I have my own, but I try to be aware of what's preference vs. what's technically superior.
I'm curious about people's thoughts on when to use LAST_VALUE() vs MAX() KEEP(DENSE_RANK LAST ORDER BY ). To my mind, both solve a similar problem. I lean towards DENSE_RANK largely out of preference due to the syntax being shorter (literally just less characters to type), and I also like that since DENSE_RANK is an aggregate function it outputs distinct results without needing to use the DISTINCT keyword. I haven't intentionally run tests comparing the two, but anecdotally I've never noticed a performance difference between the two when writing comparable queries.
Surprisingly I couldn't really find any detailed articles or discussions online comparing these two functions and I'm curious what thoughts are out there in the wild.
-
Building a DIY ERP/Inventory Database?
I currently run operations for a small lab. I have built a fairly complex Access database from scratch in order to manage all budgeting, purchasing, inventory, and invoicing systems. I spend a bit of time each day maintaining/improving it. I am also currently in a year long computer science program learning c++. I would like more practice with sql was just curious if anyone had any recommendations for recreating my database in a more modern fashion.. Access works, but is a bit clunky/fragile.
Our software budget is nonexistent, so considering open source or from scratch. I have recreated all my tables in mysql, but is mysql the best way to go? As far as a front end, is there anything I can implement with c++? Or is this worth dabbling in another language for? I want something that I can both learn from but will also be useful/reliable enough to replace my Access database. Or would this be a total waste of time for how challenging building this from scratch would be?
Thanks! I appreciate any advice!
-
When you're asked to write a custom query to be used in crystal reports
I got this as a reaction to this post and I just felt it in my soul.
https://lemmy.world/comment/4795320
- www.techrepublic.com NoSQL keeps rising, but relational databases still dominate big data
Even though MongoDB and Cassandra keep winning converts, enterprises are keeping their RDBMSes around, and will do so for quite some time.
As an RDBMS professional - I found this article quite engaging, although a bit old.
-
Graphical SQL Editor with auto-complete for Relational Tables?
Hi!
I'm looking at manually entering quite a bit of relational data and I am wondering whether anyone knows of a nice GUI tool to do it?
What I'm looking at doing is something like matching up names with addresses. I have a table with a list of people, and I have a list of properties. I want to create a table where I could pair up people with properties. I would like the ID's to be entered into the Database, but I would like to see names and addresses on the front-end. Preferably when I click into the new relational table's columns it would give me an auto-complete list of possible values as I type. (So offer suggestions for names / addresses).
I'm looking for something web-based or MacOS / Linux compatible.
Does anyone know of such a tool?
- xata.io Create an advanced search engine with PostgreSQL
PostgreSQL provides the necessary building blocks for you to combine and create your own search engine for full-text search. Let's see how far we can take it.
-
Are there patterns one learns to solve SQL interview questions (or tasks in general)?
I recently tried my hand at an advanced online SQL test for a io position. Time-trial, non-autocompleting IDE, no human interaction. I failed miserably (0%) and I am fine with it. I have prepared myself with StrataScratch and the Mode tutorial, on top of my experience in querying GA4 data in BQ and other data for finance, sales and operations. . Although the resources are good to familiarize with SQL functions and structuring queries, I still feel that I am missing some kind of mindset that would enable me to tackle SQL questions irrespective of complexity. I don't want to know necessarily the details, if it is hard for you to explain, but I would like to know if there is such a state of mind to achieve. Of course, any description and resource is welcome.
-
Your favorite database engine?
Obviously Microsoft Access is the best but it would be cool to hear your opinion.
-
Best practices for writing SQL (according to metabase)
www.metabase.com Best practices for writing SQL queriesSQL best practices: a brief guide to writing better SQL queries.
Who doesn't love a good discussion about best practices? Here is an article from metabase on their recommended best practices for writing SQL. Share you opinion and recommendations.
-
Ask complex questions of high-volume real-time data streams
github.com GitHub - ArroyoSystems/arroyo: Distributed stream processing engine in RustDistributed stream processing engine in Rust. Contribute to ArroyoSystems/arroyo development by creating an account on GitHub.
Use SQL to query live data streams. Similar to Apache Fink and Kafka Streams.
-
SQL:2023 is finished: Here is what's new (Peter Eisentraut)
peter.eisentraut.org SQL:2023 is finished: Here is what’s newSQL:2023 has been wrapped. The final text has been submitted by the working group to ISO Central Secretariat, and it’s now up to the ISO gods when it will be published. Based on past experience, it could be between a few weeks and a few months.
New SQL 2023 - Per Peter, here are the main three topics:
- Various smaller changes to the existing SQL language
- New features related to JSON
- A new part for property graph queries
-
Announcing SQL Community
Hi Everyone:
The SQL community has been created where we can discuss anything related to SQL, regardless of dialect or version.
Please share your posts and questions for the community to discuss or answer.