I played with ChatGPT for the first time today. For those who don’t know what ChatGPT is, I asked it and this was the response.
ChatGPT is an open-source chatbot framework that enables developers to quickly create natural language understanding chatbots using the GPT-3 language model.
https://beta.openai.com/playground
If that still doesn’t make sense, I asked it to explain in a less technical style.
ChatGPT is a tool that makes it easy for developers to create chatbots that can understand and respond to natural language conversations.
https://beta.openai.com/playground
I asked a few technical questions and got some pretty plausible answers. When I went to test out the code, It did reveal some errors which showed me that this model is not accurate enough yet, however it gave me a huge headstart versus coding from scratch. I would say ChatGPT is helpful if you know roughly what you need and can troubleshoot syntax issues. If you have no clue about what you are asking for, I wouldn’t trust the output just yet.
I’ll create separate blog posts in the coming days for how each response fared. This is the list of questions I asked:
- Write the T-SQL to create SQL Server tables for Customers and SalesOrderHeader and SalesOrderDetail. Customers table should have an identity column, first name, last name, date of birth. I expect to have up to 1 million customers. SalesOrderHeader table can have many rows from SalesOrderDetail, SalesOrderDetails can only relate to one SalesOrderHeader. I expect to have 3 billion orders.
- First impressions were it picked C: drive as location but I can forgive that since it doesn’t know my defaults.
- It chose an INT for the sales tables; ID columns and I was really expecting a BIGINT.
- The Sales tables were a bit light on detail but it set up foreign keys.
- Write the T-SQL for a SQL Agent job to run Ola Hallengren’s backup procedures against all databases. System databases should be backed up in full daily. The user databases are called Sales, Finance and DBA. User Databases should be backed up in full on a Sunday, with daily differential backups, and t-log backups every 10 minutes except DBA which is in simple recovery so only needs full daily backups.
- First run didn’t work due to The specified ‘@freq_subday_interval’ is invalid.
- When I fixed that, the schedules were still way off
- It did recognise I needed different schedules for system and user databases but the script wasn’t right.
- This was the schedule to the transaction log backups: Occurs every 10 day(s) every 1 minute(s) between 00:00:00 and 23:59:59. Schedule will be used starting on 16/01/2020.
- Write a script that will send an email alert via SNS if an AWS Athena table or view does not exist.
- The command to check Athena didn’t work
- The command to send the SNS message did
- So this saved me a good bit of time, I only had to work out the AWS Athena CLI command.
- Write an email pitch from a small SQL Server Consultancy to small business owners and CTOs
- Not too bad and while I don’t send cold emails, it didn’t seem unreasonable. It could possibly convert to web copy.
As I said, I’ll follow up with individual posts on each of the technical questions I asked but in the meantime, here is the response to me asking ChatGPT to:
“Write an email pitch from a small SQL Server Consultancy to small business owners and CTOs”
Subject: SQL Server Solutions to Enhance Your Business
Dear [Name],
As a small business owner or CTO, you know how important data is to the success of your organization. That’s why you need reliable, efficient, and secure solutions to store and manage your data.
At [Your Company Name], we specialize in providing small businesses and organizations with the right SQL Server solutions to meet their needs. We understand the complexities of data management and can provide solutions that maximize performance and security.
We can help you:
• Design and implement a secure database infrastructure
• Optimize and develop database solutions
• Monitor and maintain database performance
• Troubleshoot database problems
• Implement data backup and recovery solutions
• Ensure data integrity
Our team of experienced SQL Server consultants will work with you to determine the best solutions for your organization. We have the expertise and knowledge to ensure that your data is secure and your organization is operating at its peak efficiency.
If you would like to learn more about how our SQL Server solutions can benefit your business, please contact us at [Your Company Contact].
Sincerely,
[Your Name]
[Your Company Name]
Leave a Reply