sql stringlengths 6 1.05M |
|---|
<filename>get-largest-content-contributors.sql
-- Source: https://jessehouwing.net/tfs-clean-up-your-project-collection/
-- Gets largest content contributors by type
-- Tweaked to get INT result for MB's (more readability)
SELECT Owner =
CASE
WHEN OwnerId = 0 THEN 'Generic'
WHEN OwnerId = 1 THEN ... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 20, 2019 at 01:05 AM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIEN... |
SELECT MountainRange, PeakName, Elevation FROM Peaks
JOIN Mountains ON Peaks.MountainId = Mountains.Id
WHERE MountainRange = 'Rila'
ORDER BY Elevation DESC |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3307
-- Время создания: Янв 22 2018 г., 05:51
-- Версия сервера: 10.2.8-MariaDB
-- Версия PHP: 5.6.31
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+0... |
<gh_stars>0
ALTER TABLE `sma_sales` ADD `rounding` DECIMAL(10,4) NULL;
ALTER TABLE `sma_categories` ADD `parent_id` INT(11) NULL;
ALTER TABLE `sma_settings` ADD `qa_prefix` VARCHAR(55) NULL;
ALTER TABLE `sma_order_ref` ADD `qa` INT(11) NULL DEFAULT '1';
RENAME TABLE `sma_adjustments` TO `sma_adjustment_items`;
ALTER TA... |
<filename>setup/create.sql<gh_stars>0
DROP TABLE IF EXISTS SessionAnswer;
DROP TABLE IF EXISTS Contact;
DROP TABLE IF EXISTS Session;
DROP TABLE IF EXISTS QuestionAnswer;
DROP TABLE IF EXISTS Answer;
DROP TABLE IF EXISTS Question;
CREATE TABLE Question (
id serial primary key,
text VARCHAR(200) not null,
contains_link... |
<filename>dln_db_2021-10-15.sql
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.34)
# Database: dln_db
# Generation Time: 2021-10-15 10:29:34 +0000
# ****************... |
<filename>vztaiwan/newsSQL.sql
CREATE database News;
CREATE TABLE news (
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(128) NOT NULL,
slug varchar(128) NOT NULL,
text text NOT NULL,
PRIMARY KEY (id),
KEY slug (slug)
);
INSERT INTO `News`.`news` (`id`, `title`, `slug`... |
SELECT * FROM "projets.csv" proj
ORDER BY proj.idp + proj.responsable ASC;
[ordered]
idp, titre, responsable
2, Capricornus, 5
9, Scorpius, 5
13, Cancer, 4
19, Libra, 8
3, Virgo, 29
18, Sagitta, 15
14, Lyra, 26
12, Ursa, 38
10, <NAME>, 44
7, Orion, 48
17, Aquila, 40
16, Perseus, 44
1, Andromeda, 68
5, Aquarius, 79
11,... |
USE master
GO
IF (OBJECT_ID('dbo.sp_hexadecimal') IS NULL)
BEGIN
EXEC('Create procedure dbo.sp_hexadecimal as raiserror(''Empty Stored Procedure!!'', 10, 1) with seterror')
IF (@@error = 0)
PRINT 'Successfully created empty stored procedure dbo.sp_hexadecimal.'
ELSE
BEGIN
... |
<reponame>jovon44/MadeiraToolbox<gh_stars>1-10
/*========================================================================================================================
Description: Display information about the instance to be used for establishing a database maintenance plan
Scope: Instance
Author: <NAME>
Create... |
<filename>SQL/create-table.sql<gh_stars>10-100
-- Table: public.redshift_results
-- DROP TABLE public.redshift_results;
CREATE TABLE public.redshift_results
(
id integer NOT NULL DEFAULT nextval('test_id'::regclass),
guid uuid NOT NULL,
"timestamp" timestamp without time zone NOT NULL,
curren... |
<reponame>iamonuwa/result<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 22, 2016 at 03:34 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_... |
<reponame>macmiller87/Curso-de-SQL-Rocketseat
SELECT * FROM aluno WHERE nome LIKE '<NAME>';
SELECT * FROM aluno WHERE responsavel LIKE '<NAME>';
SELECT * FROM aluno WHERE responsavel LIKE 'josefina%';
SELECT * FROM aluno WHERE responsavel LIKE 'Marcio%';
SELECT * FROM aluno WHERE responsavel LIKE '%G%';
SELECT * F... |
<filename>src/main/resources/db/migration/V1__Initial.sql
/*
* Copyright (c) 2020-2021, <NAME>.V., https://www.philips.com
* SPDX-License-Identifier: MIT
*/
CREATE SEQUENCE hibernate_sequence START WITH 1;
CREATE TABLE scans
(
id BIGINT NOT NULL,
purl CLOB NOT NULL,
location CLO... |
<gh_stars>100-1000
-- autoinc.test
--
-- execsql {
-- DROP TABLE t1;
-- SELECT name FROM sqlite_sequence;
-- }
DROP TABLE t1;
SELECT name FROM sqlite_sequence; |
<gh_stars>0
-- database structure
create table category (
categoryID int primary key auto_increment,
categoryName varchar(250),
level int (11) default 1,
parent int (11) default 0
);
create table books (
bookID int primary key auto_increment,
bookName varchar(250),
categoryID int,
quantity int (11),
... |
<filename>sql/updates/0.8/4597_realmlist.sql
ALTER TABLE realmd.realmlist
ADD COLUMN `population` float(0) UNSIGNED NOT NULL DEFAULT 0.0 AFTER `allowedSecurityLevel`;
|
<reponame>predictiverye/SQL-Server-R-Services-Samples
IF OBJECT_ID('dbo.usp_GenerateHistorcialData', 'P') IS NOT NULL
DROP PROCEDURE [dbo].[usp_GenerateHistorcialData]
GO
CREATE PROCEDURE [dbo].[usp_GenerateHistorcialData]
AS
BEGIN
SET NOCOUNT ON;
declare @currTimestamp_15min datetime;
declare @currTimestamp_h... |
<filename>nro-legacy/sql/object/names/namesdb/trigger/namex_transaction_qmsg.sql
-- noinspection SqlNoDataSourceInspectionForFile
DROP TRIGGER NAMEX_TRANSACTION_QMSG;
CREATE OR REPLACE TRIGGER namex_transaction_qmsg AFTER INSERT ON TRANSACTION FOR EACH ROW
BEGIN
namex_trigger_handler.enqueue_transaction(:new.tran... |
<reponame>ChinaLym/learn-spring-security
/*
SQLyog v10.2
MySQL - 5.7.20 : Database - learn_security
https://gitee.com/ChinaLym/learn-spring-security
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_... |
SELECT DISTINCT {0} PERSON_ID, PERSON_ID
FROM {sc}.PERSON
order by PERSON_ID |
<filename>Backend/Microservices/UserService/DB/StoredProcedures/sp_ValidateOrCreateOTP.sql
drop procedure if exists sp_ValidateOrCreateOTP;
create procedure sp_ValidateOrCreateOTP(parPhone varchar(15), parOtp int, parValidity varchar(20), parIsCheck int,
parExtraData text)
begin
... |
-- @testpoint: opengauss关键字system(非保留),作为函数名,部分测试点合理报错
--关键字不带引号-成功
drop function if exists system;
create function system(i integer)
returns integer
as $$
begin
return i+1;
end;
$$ language plpgsql;
/
--关键字带双引号-成功
drop function if exists "system";
create function "system"(i integer)
returns integer
as $$
begin
... |
<filename>test/sql/fkeys.sql
\set ECHO 0
\i sql/index_analyzer.sql
\set ECHO all
-- can't be executed in a trasaction because we need stats to be updated
-- create table with an indexes, fill it with enough data
CREATE TABLE main_table(col_a INT PRIMARY KEY);
CREATE TABLE child_table(col_a INT, col_b INT REFERENCES m... |
REPLACE INTO `list_recruitment_status` (`id`, `created`, `updated`, `name`, `slug`, `status`) VALUES (1,'1970-01-01 00:00:00','1970-01-01 00:00:00','Recruiting','recruiting',1);
REPLACE INTO `list_recruitment_status` (`id`, `created`, `updated`, `name`, `slug`, `status`) VALUES (2,'1970-01-01 00:00:00','1970-01-01 00:0... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 29, 2021 at 07:07 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
/***************************************************************************
*
* 请空数据库
*
**************************************************************************/
DROP TABLE IF EXISTS `EDU_SITE_CONFIG`;
DROP TABLE IF EXISTS `EDU_USERS`;
DROP TABLE IF EXISTS `EDU_SITES`;
/************************************... |
/*PROCEDIMIENTO ALMACENADO PARA CONTROLAR A LOS USUARIO*/
/*ULIMAS CONEXIONES, ACTUALIZAR CONTRASEñA O REINICIAR SU CUENTA*/
USE `reuniones_elim`;
DROP procedure IF EXISTS `sp_usuarios`;
USE `reuniones_elim`;
DROP procedure IF EXISTS `reuniones_elim`.`sp_usuarios`;
;
DELIMITER $$
USE `reuniones_elim`$$
CREATE PROCED... |
-- a data point for a run time chart
DROP TYPE IF EXISTS pg_temp.RUN_STAT CASCADE;
CREATE TYPE pg_temp.RUN_STAT AS (
run_id INTEGER, -- for debugging
start_time TIMESTAMPTZ, -- either the start time of the node or the first of its child nodes
node_name TEXT, -- the name of the node that is run
node_run JSONB,... |
do
$setup_database$
begin
create sequence if not exists hibernate_sequence;
create table if not exists "user" (
use_cod bigint not null generated by default as identity,
use_name varchar not null,
use_email varchar not null,
use_phone varchar not null,
use_password varchar not null,
constr... |
-- file:insert.sql ln:131 expect:true
create table part_ee_ff partition of list_parted for values in ('ee', 'ff') partition by range (b)
|
DROP SCHEMA IF EXISTS m_dim_next CASCADE;
CREATE SCHEMA m_dim_next;
DROP SCHEMA IF EXISTS m_tmp CASCADE;
CREATE SCHEMA m_tmp;
|
DROP TABLE IF EXISTS `shuyang_mobile`; |
<reponame>gengxiaoyun/test<gh_stars>0
insert into t_meta_mysql_cluster_info(id, cluster_name, monitor_system_id, env_id)
values(2, 'cluster_name', 2, 1);
insert into t_meta_mysql_cluster_info(id, cluster_name, monitor_system_id, env_id)
values(4, 'cluster4', 4, 1); |
-- Add repository groups
update gha_repos set repo_group = name;
update gha_repos set alias = name;
update gha_repos
set repo_group = 'Jaeger', alias = 'Jaeger'
where name in (
'jaegertracing/jaeger',
'uber/jaeger'
);
select
repo_group,
count(*) as number_of_repos
from
gha_repos
where
repo_group is not n... |
/*
* Copyright (c) 2015-2016 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
ALTER TABLE ${ohdsiSchema}.concept_set
ADD COLUMN created_by VARCHAR(255),
ADD COLUMN modified_by VARCHAR(255),
ADD COLUMN created_date TIMESTAMP WITH TIME ZONE,
ADD COLUMN modified_date TIMESTAMP WITH TIME ZONE; |
<filename>reforestration_canada(1).sql
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 14, 2021 at 08:50 PM
-- Server version: 5.7.33-0ubuntu0.16.04.1
-- PHP Version: 5.6.40-47+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_O... |
<reponame>mengxr/morpheus
-- normalize place
CREATE VIEW LDBC.city AS
SELECT id, name, url
FROM LDBC.place
WHERE type == 'city';
CREATE VIEW LDBC.country AS
SELECT id, name, url
FROM LDBC.place
WHERE type == 'country';
CREATE VIEW LDBC.continent AS
SELECT id, name, url
FROM LDBC.place
WHERE type == 'continent';
-- n... |
<filename>base_layer/wallet/migrations/2021-04-29-125155_known_scripts/up.sql
CREATE TABLE known_one_sided_payment_scripts (
script_hash BLOB PRIMARY KEY NOT NULL,
private_key BLOB NOT NULL,
script BLOB NOT NULL,
input BLOB NOT NULL
);
|
<reponame>samyond6688/tapplus_admin<filename>db/publish_admin.sql<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
-- Host: localhost Database: publish_admin
-- ------------------------------------------------------
-- Server version 5.7.27-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 07, 2021 at 03:48 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
-- gets sum of play hour of each player who has more than some hours of play
-- the having clause filters players with at least some amount of play hours
SELECT
user_id,
SUM ( hours_played )
FROM
user_games
GROUP BY
user_id
HAVING
SUM ( hours_played ) > 1; |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 26, 2022 at 05:35 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<reponame>adiraka/antrian-mcsp
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 08 Sep 2019 pada 15.09
-- Versi Server: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 08, 2019 at 05:25 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'600647',@CutoffDate = N'2017-09-30',@EPS = N'0.0805',@EPSDeduct = N'0',@Revenue = N'2079.96万',@RevenueYoy = N'-43.36',@RevenueQoq = N'9.38',@Profit = N'1120.21万',@ProfitYoy = N'-85.00',@ProfiltQoq = N'-309.62',@NAVPerUnit = N'2.5039',@ROE = N'3.08',@CashPerUnit = N'-0.1155',@GrossPr... |
<gh_stars>0
CREATE TABLE `facture` (
`id` int(11) NOT NULL AUTO_INCREMENT ,
`client_id` int(11) NULL DEFAULT NULL ,
`date` datetime NOT NULL ,
`final_price` double NOT NULL ,
`transport_cost` double NOT NULL ,
`discount` double NOT NULL ,
`first_client_discount` double NULL ,
PRIMARY KEY (`id`),
... |
--@formatter:off
-- Table account
INSERT INTO account (login, password) VALUES ('<PASSWORD>', '<PASSWORD>');
INSERT INTO account (login, password) VALUES ('<PASSWORD>', '<PASSWORD>');
INSERT INTO account (login, password) VALUES ('<PASSWORD>', '<PASSWORD>');
INSERT INTO account (login, password) VALUES ('<PASSWORD>', ... |
<reponame>jichang/sso<gh_stars>1-10
DELETE FROM sso.roles
WHERE name = 'admin';
DELETE FROM sso.roles
WHERE name = 'normal';
DELETE FROM sso.roles
WHERE name = 'guest'; |
-- Text encoding used: UTF-8
--
BEGIN TRANSACTION;
-- Table: users
CREATE TABLE users (
id CHAR(8) UNIQUE NOT NULL,
time VARCHAR(30) DEFAULT (CURRENT_TIMESTAMP) NOT NULL, -- Postgres CURRENT_TIMESTAMP is 29 chars long
name VARCHAR(255),
secret CHAR(30) NOT NULL,
slack_id V... |
<reponame>bettercodepaul/swt2-bsa-backend<filename>bogenliga/bogenliga-application/src/main/resources/db/migration/all/V29_0__insert_rolle_recht_ligaleiter.sql
-- Rolle Ligaleiter hat Recht CAN_DELETE_STAMMDATEN
INSERT INTO rolle_recht(
rolle_recht_rolle_id,
rolle_recht_recht_id
)
VALUES (
2, 28
); |
# --- !Ups
create table "USERS" (
ID INT PRIMARY KEY NOT NULL,
CREATED DATETIME NOT NULL,
UPDATED DATETIME,
LAST_LOGIN DATETIME
);
# --- !Downs
drop table "USERS" if exists;
|
Create table If Not Exists Logins (user_id int, time_stamp datetime);
Truncate table Logins;
insert into Logins (user_id, time_stamp) values ('6', '2020-06-30 15:06:07');
insert into Logins (user_id, time_stamp) values ('6', '2021-04-21 14:06:06');
insert into Logins (user_id, time_stamp) values ('6', '2019-03-07 00:18... |
<gh_stars>1-10
delete from Category cascade;
insert into Category values('760aa25b-f984-4a3d-9c5d-d1313f49fe08', 'Electronics', null);
insert into Category values('b64542d4-328f-4670-adc9-1e9f6dc09219', 'Camera & Photo', '760aa25b-f984-4a3d-9c5d-d1313f49fe08');
insert into Category values('c7066d01-73ee-4023-a98c-70... |
<reponame>Monaqo/accountgo
ALTER TABLE [dbo].[PurchaseReceiptHeader] WITH CHECK ADD CONSTRAINT [FK_dbo.PurchaseReceiptHeader_dbo.GeneralLedgerHeader_GeneralLedgerHeaderId]
FOREIGN KEY([GeneralLedgerHeaderId]) REFERENCES [dbo].[GeneralLedgerHeader] ([Id])
GO
ALTER TABLE [dbo].[PurchaseReceiptHeader] WITH CHECK ADD C... |
<gh_stars>10-100
SET NAMES 'utf8';
ALTER TABLE `PREFIX_carrier` CHANGE `max_weight` `max_weight` DECIMAL( 20, 6 ) NULL DEFAULT '0';
DELETE ms.*, hm.* FROM `PREFIX_module_shop` ms INNER JOIN `PREFIX_hook_module` hm USING (`id_module`) INNER JOIN `PREFIX_module` m USING (`id_module`) WHERE m.`name` LIKE 'backwardco... |
{{
config(
materialized='view'
)
}}
SELECT
id,
event_id,
session_id,
user_id,
page_url,
REPLACE(page_url,'https://greenary.com/product/','') AS product_id,
CASE
WHEN page_url LIKE '%browse%' THEN 'Search Page'
WHEN page_url = 'https://greenary.com' THEN 'Home Page'
... |
CREATE TABLE IF NOT EXISTS `users` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`first_name` text NOT NULL,
`last_name` text NOT NULL,
`mob_no` int(11) NOT NULL,
`user_name` varchar(20) NOT NULL,
`password` varchar(15) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4... |
UPDATE OASE_T_SYSTEM SET maintenance_flag=1 WHERE item_id=31;
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 25, 2016 at 02:18 PM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 7.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
DROP FUNCTION get_candidates(text, text, thorough boolean);
CREATE OR REPLACE FUNCTION
get_candidates(target text, token text, thorough boolean DEFAULT false)
RETURNS setof geoentity AS $$
DECLARE
geoentities geoentity%rowtype;
most_common_country_code varchar;
BEGIN
RETURN QUERY SELECT id, admin_level, app... |
<reponame>onlyten/weimei
/*
Navicat MySQL Data Transfer
Source Server : serv2
Source Server Version : 50148
Source Host : qdm102668679.my3w.com:3306
Source Database : qdm102668679_db
Target Server Type : MYSQL
Target Server Version : 50148
File Encoding : 65001
Date: 2016-01-20 10:... |
<reponame>astaupb/coupons_backend
CREATE USER asta_coupon_user WITH PASSWORD '<PASSWORD>'; |
CREATE TABLE escola.pessoa (
idpessoa INT NOT NULL,
nome VARCHAR(45) NULL,
datanasc DATE NULL,
email VARCHAR(45) NULL,
idestcivil INT NOT NULL,
idsexo INT NOT NULL,
PRIMARY KEY (idpessoa, idestcivil,
idsexo),
CONSTRAINT fk_pessoa_estcivil
FOREIGN KEY (idestcivil)
REFERENCES escola.estcivil (idestcivil),
CON... |
-- MySQL Script generated by MySQL Workbench
-- qua 20 mar 2019 18:17:24 -03
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE... |
<reponame>faisalsyfl/SIPROMON
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 13 Mei 2018 pada 08.47
-- Versi Server: 10.1.9-MariaDB
-- PHP Version: 7.0.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
--Data Types in SQL Server
--Numeric
--Whole Numbers
-- TinyInt -1 byte
-- SmallInt -2 byte
-- Int -4 byte
--Big int -8 byte
-- floating-point numbers
--Float, Real
--Decimal/Numberic(n,p)
--highest percision, custom persiceion
--n number of digits of percision
--p means number of those that a... |
DROP OWNED BY supabase_admin;
DROP USER supabase_admin; |
<reponame>rosealexander/nextjs-auth0-template
/*
Warnings:
- You are about to drop the column `authorId` on the `Post` table. All the data in the column will be lost.
- You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost.
- Added the required column `user_id... |
-- file:float8.sql ln:133 expect:true
SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5
|
-- NSDI topology but with MDA-lite instead of MDA
-- Routes per flow ID
-- 0 1 2 4 6
-- 1 1 2 4 6
-- 2 1 2 4 6
-- 3 1 2 4 6
-- 4 1 3 5 6
-- 5 1 3 5 6
-- 6 1 2 4 6
-- 7 1 2 4 6
-- 8 1 2 4 6
-- 9 1 3 5 6
-- 10 1 3 7 6
-- 11 1 2 4 6
-- 12 1 2 4 6
-- 13 1 2 4 6
-- 14 1 3 5 6
-- 15 1 3 7 6
-- Round 1, 6 probes pe... |
<filename>backend/de.metas.edi/src/main/sql/postgresql/system/80-de.metas.edi/5538870_sys_gh5896_add_generate_CSV_file_for_SSCC_labels_processes.sql
-- 2019-12-12T16:05:59.208Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,Allo... |
<reponame>vidapogosoft/SQLServerDev092021
---SPACE
---CONCAT
select FirstName + ' ' + LastName from AdventureWorks2014.Person.Person
select CONCAT(FirstName, SPACE(1) , LastName) as Personas from AdventureWorks2014.Person.Person
select FirstName as Nombres, LastName as Apellidos, Title as Titulo from AdventureWorks... |
<filename>01-MS SQL/06-Subqueries And Joins/11-Min Average Salary.sql
SELECT
MIN(AverageSalaries.AverageSalary) AS MinAverageSalary
FROM
(
SELECT
AVG(Salary) AS AverageSalary
FROM Employees
GROUP BY DepartmentID
) AS AverageSalaries; |
select * from `filter/pushdown/DRILL_5796_test_data.parquet` where ts_col > '2016-01-09 00:00:45' order by id limit 5;
|
-- change group_ids length of users to unlimited
select fn_db_change_column_type('users','group_ids','varchar','text');
|
<filename>database-common/migrations/20210223000000_add_indices/down.sql
DROP INDEX IF EXISTS DEVICES_BY_FINALIZER_COUNT;
DROP INDEX IF EXISTS DEVICES_BY_APP_ID_IDX;
|
<gh_stars>0
-- Add indexes to support JOINs in TableRepo::get_table_persist_info
-- https://github.com/influxdata/influxdb_iox/blob/aaec1c7828139e47296665c84aeea4c974026118/iox_catalog/src/postgres.rs#L717-L734
CREATE INDEX IF NOT EXISTS table_name_namespace_idx ON table_name (namespace_id);
CREATE INDEX IF NOT EXISTS... |
<filename>stats/blocked_activity_brief.sql
-- Show backends which are blocked and blocker PIDs. Output doesn't include extended information about blocker PIDs.
-- Min. required version: Postgres 9.6
SELECT
pid,
now() - state_change AS waiting_age,
array_length(pg_blocking_pids(pid), 1) AS n_blocker... |
/* ATUALIZA NOTAS FISCAIS */
CREATE VIEW V_NOTA_FISCAL AS
SELECT ID_NOTA_FISCAL, SUM(TOTAL) AS SOMA
FROM ITEM_NOTA
GROUP BY ID_NOTA_FISCAL
SELECT * FROM V_NOTA_FISCAL
ORDER BY 1
CREATE VIEW V_CARGA_NF AS
SELECT N.IDNOTA, N.TOTAL TOTALNOTA, I.SOMA
FROM NOTA_FISCAL N
INNER JOIN V_NOTA_FISCAL I
ON IDNOTA = ID_NOTA_FISC... |
CREATE TABLE [cmn].[game_move] (
[game_move_id] INT IDENTITY (1, 1) NOT NULL,
[game_id] INT NOT NULL,
[player] VARCHAR (1) NOT NULL,
[start_time] DATETIME NOT NULL,
[end_time] DATETIME NOT NULL,
[from_position] ... |
<reponame>pirocorp/Databases-Basics-MS-SQL-Server
SELECT e.FirstName + ' ' + e.LastName AS [Full Name],
DATENAME(WEEKDAY, s.CheckIn) AS [Day of week]
FROM Employees AS e
LEFT JOIN Orders AS o ON o.EmployeeId = e.Id
INNER JOIN Shifts AS s ON s.EmployeeId = e.Id
WHERE o.Id IS NULL
AND DATEDIF... |
<reponame>pedroroque/DigitalBroadcaster<filename>src/Broadcaster.DB/Broadcaster.DB/dbo/Views/ViewRMFiles.sql<gh_stars>0
CREATE VIEW [dbo].[ViewRMFiles]
AS
SELECT dbo.RMs.ID, RTRIM(dbo.HD.Path)
+ '\' + RTRIM(dbo.RMs.FileName) AS FileName
FROM dbo.RMs INNER JOIN
dbo.HD ON dbo.RMs.PathID = dbo.HD.ID
WHERE (dbo.... |
EXEC [EST].[Proc_yjbb_Ins] @Code = N'601717',@CutoffDate = N'2017-09-30',@EPS = N'0.19',@EPSDeduct = N'0',@Revenue = N'53.48亿',@RevenueYoy = N'94.18',@RevenueQoq = N'-13.17',@Profit = N'3.19亿',@ProfitYoy = N'149.06',@ProfiltQoq = N'75.75',@NAVPerUnit = N'6.2745',@ROE = N'3.06',@CashPerUnit = N'0.5254',@GrossProfitRate ... |
-- Returns the artworks relative to the game with the given ID
SELECT id, title, url, userToGame.user_id FROM Artwork LEFT JOIN userToGame on ID = userToGame.artwork_id WHERE userToGame.game_id = ?
|
<gh_stars>0
DROP TABLE `member_wallet_balance`; |
<gh_stars>0
/* Seeds for SQL table. We haven't discussed this type of file yet */
USE bamazon;
/* Insert 3 Rows into your new table */
INSERT INTO products (product_name)
VALUES ("4K Samsung TV");
INSERT INTO colleges (product_name)
VALUES ("Tablet");
INSERT INTO colleges (product_name)
VALUES ("Rapid Dro... |
<reponame>jspilinek/oracleperf
DEF title = 'Log Mode (V$DATABASE)';
DEF filename = 'LogMode.html';
DEF nextpage = 'DiskIO.html';
DEF prevpage = 'SchedulerJobs.html';
@@00_begin.sql
@@sql/sub/LogMode.sql
SET MARK HTML OFF;
PRO <h2>Comments</h2>
PRO <p>Check if <b>LOG_MODE</b> is <b>ARCHIVELOG</b> or <b>NOARC... |
<reponame>chandra-prakash-reddy/user_registry_service
drop schema if exists registry cascade;
create schema registry;
drop table if exists registry.portal_users cascade;
create table registry.portal_users (
userid varchar not null,
username varchar,
password varchar,
email varchar,
crt_ts timestamp
);
ALTER TABLE regi... |
<reponame>unicate/rigatoni<gh_stars>0
DROP TABLE IF EXISTS `test_094`; |
INSERT INTO n11_bootcamp.public.customer(customer_id,store_id,first_name,last_name,email,address_id,activebool,create_date,last_update,active) VALUES(1,null,'Mary','Smith','<EMAIL>',5,TRUE,'2006-02-14','2013-05-26 14:49:45.738',1);
INSERT INTO n11_bootcamp.public.customer(customer_id,store_id,first_name,last_name,email... |
/*
Right joins aren't as common as left joins. One reason why is that you can always write a right join as a left join.
*/
/*
Instructions
The left join code is commented out here. Your task is to write a new query using rights joins that produces the same result as what the query using left joins produces. Keep this ... |
<filename>test_append/customer/update_0.sql
INSERT INTO public.customer VALUES (134045, 'Customer#000134045', 'RptouEGFhE4FCvuIWlC1sBKL2s5l emj', 24, '34-175-646-1915', 2105.49, 'AUTOMOBILE', 'e, final packages along the carefully final accounts cajole blithely along the slyly pending accounts. furiously i');
INSERT IN... |
create view _airbyte_test_normalization.`dedup_cdc_excluded_ab4__dbt_tmp` as (
-- SQL model to prepare for deduplicating records based on the hash record column
select
*,
row_number() over (
partition by _airbyte_dedup_cdc_excluded_hashid
order by _airbyte_emitted_at asc
) as _airbyte_row_num
from... |
<reponame>luizgribeiro/airbyte
{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }}
-- SQL model to build a hash column based on the values of this record
select
*,
{{ dbt_utils.surrogate_key([
'_AIRBYTE_CHILDREN_HASHID',
'OWNER_ID',
]) }} as _AIRBYTE_OWNER_HASHID... |
<filename>hasura/migrations_history/1609720047592_alter_table_public_transactions_add_column_asset/up.sql
ALTER TABLE "public"."transactions" ADD COLUMN "asset" text NULL;
|
<reponame>Shuttl-Tech/antlr_psql
-- file:event_trigger.sql ln:74 expect:false
create event trigger regress_event_trigger2 on ddl_command_start
execute procedure test_event_trigger('argument not allowed')
|
SELECT
mimeType,
COUNT(0) AS count
FROM
`httparchive.almanac.wasm_stats`
WHERE
date = '2021-09-01'
GROUP BY
mimeType
ORDER BY
count DESC
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.