sql stringlengths 6 1.05M |
|---|
<reponame>Wind-318/Wind-Server<filename>sql/user.sql
CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT,
`account` varchar(255) NOT NULL,
`password` varchar(256) DEFAULT NULL,
`username` varchar(40) NOT NULL,
`level` int NOT NULL DEFAULT '0',
`authority` int NOT NULL DEFAULT '0',
`pic` varchar(255) NO... |
<gh_stars>1-10
CREATE TABLE IF NOT EXISTS round (
round_number INTEGER PRIMARY KEY AUTOINCREMENT,
total_shares REAL,
total_reward REAL,
blocks INTEGER,
start_date_time TEXT NOT NULL,
end_date_time TEXT,
is_active INTEGER NOT NULL,
is_paid INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS block (
id INTE... |
-- file:groupingsets.sql ln:28 expect:true
copy gstest3 from stdin
|
<gh_stars>100-1000
ALTER TABLE nzbs change nzbs.group nzbs.groupname varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0';
UPDATE site set value = '112' where setting = 'sqlpatch';
|
<filename>BD1/0922-Select/ex05.sql
select d.numero, d.nome, f.nome from departamento d, funcionario f where f.numero = d.numeroFuncGer;
|
/* Seasons */
insert into season (year) values ('2016');
insert into season (year) values ('2017');
/* Weeks */
insert into week (season_id, week, label) values ((select s.id from season s where s.year = '2016'), 1, 'Week 1');
insert into week (season_id, week, label) values ((select s.id from season s where s.year =... |
-------------------------- SysFunctionService --------------------------------------------
查询功能树
#sql("getFunctionTree")
select * from sys_function where parent_code=? order by order_no asc
#end
查询用户权限菜单树
#sql("getUserFunctionTree")
select DISTINCT a.order_no ,a.id,a.parent_code,a.func_name,a.link_page,a.i... |
insert into repository (url, name, namespace) values('url1', 'name1', 'namespace1');
insert into package_versions (version_id, repository_url, ref, erl_version) values('version_id1', 'url1', '1.0.0', '18');
insert into package_versions (version_id, repository_url, ref, erl_version) values('version_id2', 'url1', '1.0.0... |
<filename>src/DLTGatewaySolution/Database/CertiPath.BlockChainGateway.Database/dbo/Views/vNamespaceTransactionsPerDay.sql
CREATE VIEW [dbo].[vNamespaceTransactionsPerDay]
AS
SELECT NEWID() AS KeyGUID, bnn.[GUID] as NamespaceGUID, bnn.Name as NamespaceName,
CAST(
DATEADD(HOUR, DATEDIFF(HOUR, SYSDATETIME... |
CREATE TABLE `categories` (
`id` int(11) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`created_at` int(11) DEFAULT NULL,
`updated_at` int(11) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
INSERT INTO `categories` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'First category', 14... |
<filename>tests/several-datasets-dp/sql/testSchema-v2.sql
BEGIN;
-- Plan the tests
SELECT plan( 12 );
SELECT has_table( 'sample_data' );
SELECT has_column( 'sample_data', 'id' );
SELECT has_column( 'sample_data', 'stress_before_test1' );
SELECT has_column( 'sample_data', 'cognitive_task2' );
SELECT has_column( 'samp... |
SELECT split_part(description, '.', 2) as table_name, tuples, extract('epoch' from duration) AS seconds
FROM reports.load
WHERE tuples > 0
ORDER BY 1;
|
<reponame>IanCanb/bamboo
ALTER TABLE warc ADD size bigint(20) NOT NULL DEFAULT 0; |
CREATE INDEX "IX_FLAT_ENDED_DATE" ON "FLAT" ("ENDED_DATE")
|
<reponame>alanfeng99/oracle-db-examples
ALTER TABLE mysales INMEMORY;
ALTER SYSTEM FLUSH shared_pool;
|
<reponame>Rob--W/phabricator
UPDATE {$NAMESPACE}_herald.herald_action a
JOIN {$NAMESPACE}_herald.herald_rule r
ON a.ruleID = r.id
SET a.action = 'diffusion.auditors.add'
WHERE r.ruleType != 'personal'
AND a.action = 'audit';
UPDATE {$NAMESPACE}_herald.herald_action a
JOIN {$NAMESPACE}_herald.herald_rule r
... |
-- @gucs gp_create_table_random_default_distribution=off
select * from public.ao_table1 order by 1;
select count(*) from heap_table3;
select count(*) from mixed_part01;
|
CREATE TABLE `flags` (
`id` int(11) unsigned AUTO_INCREMENT NOT NULL PRIMARY KEY,
`addon_id` int(11) unsigned NOT NULL UNIQUE,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`adult_content` int(1) unsigned NOT NULL DEFAULT '0',
`child_content` int(1) unsigned NOT NULL DEFAULT '0'
) E... |
<reponame>opengauss-mirror/Yat
-- @testpoint:opengauss关键字owned(非保留),修改数据库对象属主
Create user ceshi1 identified by 'Xiaxia@<PASSWORD>';
Grant all privileges to ceshi1;
DROP OWNED BY ceshi1;
Create user ceshi2 identified by 'Xiaxia@<PASSWORD>';
Grant all privileges to ceshi2;
DROP OWNED BY ceshi2;
REASSIGN OWNED BY ce... |
# Host: localhost (Version 5.5.5-10.4.17-MariaDB)
# Date: 2021-02-15 11:08:48
# Generator: MySQL-Front 6.1 (Build 1.26)
#
# Structure for table "tb_job"
#
DROP TABLE IF EXISTS `tb_job`;
CREATE TABLE `tb_job` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`job` varchar(100) DEFAULT NULL,
`qualification... |
<gh_stars>0
CREATE TABLE MO_WAREHOUSE.WBES_RTM_PXI (
ID NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY,
TIME_STAMP DATE,
beneficiary VARCHAR2(250),
data_VALUE NUMBER(25,4),
beneficiary_type VARCHAR2(250),
UNIQUE(time_stamp, beneficiary, beneficiary_type)
); |
<reponame>Wilfongjt/lyb-api<filename>pg_db/sql-v021-hobby/20.base.07.get_jwt_claims.function.sql
\c pg_db
SET search_path TO base_0_0_1, public;
-- app.settings.get_jwt_claims
-- app.settings.jwt_secret
-- request.jwt.claim.key'
-------------
-- Gets
-------------
-- [# JWT_Claims]
/*
CREATE OR REPLACE FUNCTION base_... |
DROP VIEW current_travel_status;
ALTER TABLE travel_status
ADD COLUMN iso VARCHAR(3);
CREATE VIEW current_travel_status AS
WITH most_recent AS (
SELECT country, MAX(updated) updated FROM travel_status GROUP BY country
)
SELECT travel_status.*
FROM travel_status
JOIN most_recent USING (country, updated)... |
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 ... |
/*
For the faster execution and improvement,
we can have another query to find out the name of the most frequent PCF
*/
SELECT
primary_collision_factor, COUNT(primary_collision_factor)
FROM
collisions
GROUP BY primary_collision_factor
ORDER BY COUNT(primary_collision_factor) DESC
LIMIT 1;
/*
And then , w... |
-- IN: table "goals" with columns la_liga_goals, copa_del_rey_goals, champions_league_goals
-- OUT: Table with a column, res
SELECT la_liga_goals+copa_del_rey_goals+champions_league_goals AS res FROM goals; |
<filename>answer.2-3/solution3.sql
SELECT COUNT(*) as "number of users", clients.name as "client's name"
FROM users
INNER JOIN clients ON client_id=clients.id
GROUP BY clients.id
|
<filename>schema.sql
DROP TABLE IF EXISTS myFavorite;
CREATE TABLE IF NOT EXISTS myFavorite(
id SERIAL PRIMARY KEY ,
title VARCHAR(255),
release_date INTEGER,
poster_path VARCHAR(1000),
overview VARCHAR(10000),
comment VARCHAR(1000)
) |
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle user
-- APEX_050000 or as the owner ... |
<filename>DotNetSurfer_Backend/database/DotNetSurfer_Backend.Database/dbo/Tables/Logs.sql
CREATE TABLE [dbo].[Logs] (
[Id] [int] IDENTITY(1,1) NOT NULL,
[Application] NVARCHAR(50) NOT NULL,
[CreateDate] DATETIME2 NOT NULL,
[Level] NVARCHAR(50) NOT NULL,
[Message] NVARCHAR(MAX) NOT NULL,
[UserEmail] N... |
insert into EGBPA_MSTR_CHECKLIST(id,checklisttype,servicetype,version,createdBy,createdDate)
values(nextval('SEQ_EGBPA_MSTR_CHECKLIST'),'INSPECTIONAREALOC',NULL,
0,1,now());
insert into EGBPA_MSTR_CHECKLIST(id,checklisttype,servicetype,version,createdBy,createdDate)
values(nextval('SEQ_EGBPA_MSTR_CHECKLIST'),'INSPECTI... |
INSERT INTO `site_property` (`id`, `name`, `meta_title`, `meta_description`, `meta_keywords`, `footer_copyright`, `footer_author`, `last_update`) VALUES
(1, 'Сергей Фомин aka mpakfm', 'Сергей Фомин aka mpakfm', 'Сергей Фомин aka mpakfm php программист сайт-резюме - mpakfm.ru', 'Сергей Фомин, mpakfm, mpakfm.ru, php, pro... |
{{ config({
"schema": "analytics"
})
}}
WITH employees as (
SELECT *
FROM {{ ref ('bamboohr_directory') }}
), contacts AS (
SELECT *
FROM {{ ref ('bamboohr_emergency_contacts') }}
), contacts_aggregated AS (
SELECT
employee_id,
SUM(IFF(home_phone IS NULL AND mobile_phone I... |
use PACKT_ONLINE_SHOP;
SELECT ProductCategoryID, ProductCategoryName
FROM ProductCategories;
|
<reponame>amosproj/amos2021ws05-fin-prod-port-quick-check
create table product_area_entity
(
id int auto_increment
primary key,
category varchar(255) null,
name varchar(255) null
);
create table project_entity
(
id int auto_increment
primary key,
creator varchar(255) ... |
SELECT AVG(CAST(CAST("RealEstate1_1"."Price" AS SIGNED) AS double)) AS "avg:Price:ok", CAST(EXTRACT(YEAR FROM "RealEstate1_1"."Date of Transfer") AS SIGNED) AS "yr:Date of Transfer:ok" FROM "RealEstate1_1" WHERE ((CAST(EXTRACT(YEAR FROM "RealEstate1_1"."Date of Transfer") AS SIGNED) IN (2005, 2006, 2007, 2008, 2009, ... |
-- Add migration script here
CREATE TABLE xp (
guild_id BIGINT NOT NULL,
user_id BIGINT NOT NULL,
score INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY(user_id, guild_id)
);
|
<reponame>UrbanOS-Examples/parking_predictor_orchestration
drop table [dbo].[stg_ips_group_parking_meter_inventory_2020];
CREATE TABLE [dbo].[stg_ips_group_parking_meter_inventory_2020](
[active] [varchar](250) NULL,
[areaname] [varchar](250) NULL,
[configid] [varchar](250) NULL,
[lat] [varchar](250) NULL,
[long] ... |
create table reserva (
id int(11) not null auto_increment,
nombre_cliente varchar(100) not null,
tipo_usuario int(1) not null,
numero_documento int(10) not null,
costo_reserva int(10) not null,
fecha_reserva date null,
primary key (id)
); |
/*
$Id: args-noinput.sql,v 1.1 2004/06/17 03:10:43 unsaved Exp $
See readme.txt in this directory for how to unit test SqlTool.
Tests: --noinput arg
HARNESS_METADATA BEGIN
arg --noAutoFile
arg --noinput
rejectStdoutRegex See this
arg ... |
<gh_stars>0
-- Update that adjusts vm_static.default_display_type enumeration
-- according to corresponding video device of vm/template.
update vm_static
set default_display_type = case
when device = 'vga'
then 0
when device = 'cirrus'
then 1
else 2
end
from vm_device
where vm_device.vm... |
INSERT INTO licences(
title,
code,
description,
url_readable,
url_legal,
version,
created_on, created_by_id, updated_on, updated_by_id
)
VALUES (
'Creative Commons Attribution',
'CC-BY',
'This licence lets others distribute, remix, tweak, and build upon your work, even commercial... |
DELETE FROM metrics_historical;
INSERT INTO metrics_historical (timestamp, user_id, user_name, challenge_slug, status, count) (SELECT date_trunc('day', actions.timestamp) AS day, COALESCE(actions.user_id, 0)::integer, COALESCE(users.display_name, ''), tasks.challenge_slug, actions.status, count(actions.id) FROM actions... |
<filename>INDEX/PK_COLL_OBJECT.sql
CREATE UNIQUE INDEX "PK_COLL_OBJECT" ON "COLL_OBJECT" ("COLLECTION_OBJECT_ID")
|
<reponame>ga4gh/drs-server
create table if not exists drs_object (
id text primary key,
description text,
created_time timestamp without time zone,
mime_type text,
name text,
size bigint,
updated_time timestamp without time zone,
version text,
is_bundle boolean
);
create table if no... |
<filename>internal/post/comment/sql/get/userID.sql<gh_stars>1-10
SELECT userId
FROM PostComments
WHERE postCommentId = ?
LIMIT 1 |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 06, 2015 at 01:35 PM
-- Server version: 5.5.25-MariaDB
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
/*L
Copyright SAIC
Distributed under the OSI-approved BSD 3-Clause License.
See http://ncip.github.com/cabio/LICENSE.txt for details.
L*/
create index AR_REFSETEIN_GENECHIP_A on AR_REFSEQ_PROTEIN(GENECHIP_ARRAY) PARALLEL NOLOGGING tablespace CABIO_MAP_FUT;
create index AR_REFSETEIN_REFSEQ_PRO on AR_R... |
<filename>openGaussBase/testcase/KEYWORDS/Day/Opengauss_Function_Keyword_Day_Case0024.sql
-- @testpoint: opengauss关键字day(非保留),作为存储过程名,部分测试点合理报错
--关键字不带引号-成功
drop procedure if exists day;
create procedure day(
section number(6),
salary_sum out number(8,2),
staffs_count out integer)
is
begin
select sum(salary), c... |
# Write your MySQL query statement below
SELECT
PROJECT.PROJECT_ID, ROUND(AVG(EMPLOYEE.EXPERIENCE_YEARS),2) as average_years
FROM
Employee
INNER JOIN
PROJECT
ON
EMPLOYEE.EMPLOYEE_ID = PROJECT.EMPLOYEE_ID
GROUP BY 1
|
{{
config(
pre_hook=[
'alter table if exists "{{ this.schema }}"."{{ this.name }}" drop constraint if exists {{ this.name }}_pk',
'alter table if exists "{{ this.schema }}"."{{ this.name }}" drop constraint if exists {{ this.name }}_uq',
],
post_hook=[
'alter table "{{ this.schema }}"."{... |
<reponame>xikyu46/whitecms
-- phpMyAdmin SQL Dump
-- version 4.4.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 22, 2016 at 05:40 PM
-- Server version: 5.5.43
-- PHP Version: 5.4.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
<filename>database/db_chinotanismail.sql
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 27, 2020 at 09:35 AM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET ... |
<reponame>dvsa/poc-new-selenium
SELECT
veh.registration,
veh.vin,
mtc.odometer_value
FROM vehicle veh
JOIN mot_test_current mtc ON mtc.vehicle_id = veh.id
JOIN model_detail md ON md.id = veh.model_detail_id
JOIN (SELECT MAX(submitted_date) AS max_date,
vehicle_id
FR... |
<filename>web-application/src/main/resources/db/sql/insert-admin.sql
INSERT INTO admin VALUES (1, 'uploadDirectory', 'C:\\Tools\\apache-tomcat-8.0.33\\webapps\\habit-helper-1.0\\resources\\core\\images');
INSERT INTO admin VALUES (2, 'serviceURL', 'http://127.0.0.1:8080/rest/provider/'); |
<reponame>MullinsLab/viroverse<filename>sql/bootstrap/04-data-hla.sql
-- HLA genotypes: required/common, plus partial types for internal use
-- The following was generated using the scripts in data/HLA/ and copied from
-- the everything-deploy.sql file. This file is kept separate solely because
-- of its size re... |
<reponame>Chriz-ONeill/PxStat<gh_stars>1-10
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date: 29/11/2018
-- Description: Gets the Live Current Release for a Release Code.
-- This is where the current data is after the start date and (... |
CREATE TABLE tasks (
id INTEGER PRIMARY KEY,
task_name TEXT NOT NULL,
start_time TIMESTAMP NOT NULL,
elapsed_time NUMERIC DEFAULT 0
);
CREATE TABLE task_session(
taskid INTEGER
); |
<filename>src/test/resources/zeroblob.test_5.sql
-- zeroblob.test
--
-- execsql {
-- INSERT INTO t1 VALUES(3,4,zeroblob(10000),5);
-- }
INSERT INTO t1 VALUES(3,4,zeroblob(10000),5); |
<gh_stars>100-1000
SET search_path = public, pg_catalog;
--
-- 1)Name: ofec_audit_case_mv; Type: MATERIALIZED VIEW; Schema: public; Owner: fec
--
CREATE MATERIALIZED VIEW ofec_audit_case_mv AS
WITH
cmte_info AS (
SELECT DISTINCT ON (cmte_audit_vw.cmte_id, cmte_audit_vw.fec_election_yr)
cmte_audit_vw.cmte... |
<reponame>patty2904/haulage<filename>extra facilities/partb.sql
/* insert sample data for at least three customers and their CAMs */
insert into cam (first_name, last_name, ni_no, telephone, mobile)
values ('Ezekiel', 'Sunson', 'EZ73591288', '01317779090',
'079945327880');
insert into cam (first_name, last_name... |
/* PG 9.2 이상이 필요하다. */
SELECT w.query as waiting_query,
w.pid as w_pid,
w.usename as w_user,
l.query as locking_query,
l.pid as l_pid,
l.usename as l_user,
t.schemaname || '.' || t.relname as table_name
FROM pg_stat_activity w
JOIN pg_locks l1 ON (w.pid = l1.pid AND NOT l... |
<reponame>bcgov/cas-ggircs<filename>ggircs-app/schema/revert/tables/ggircs_user.sql
-- Revert ggircs-app:tables/ggircs_user from pg
begin;
drop table ggircs_app.ggircs_user;
commit;
|
/****** Object: UserDefinedFunction [dbo].[GetExperimentPlexMembers] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[GetExperimentPlexMembers]
/****************************************************
**
** Desc: Builds delimited list of experiment plex members for a given exper... |
insert into users (username, password) values ('admin', '<PASSWORD>');
insert into users (username, password) values ('user', '<PASSWORD>');
insert into authorities (username, authority) values ('admin', 'ADMIN');
insert into authorities (username, authority) values ('user', 'USER');
|
<filename>echo-sql/sql/init.sql
CREATE TABLE IF NOT EXISTS url_map (
id char(8) NOT NULL,
redirect_url varchar(150) NOT NULL UNIQUE,
created_at timestamp WITHOUT time zone NOT NULL,
updated_at timestamp WITHOUT time zone NOT NULL,
PRIMARY KEY(id)
); |
<filename>integration_tests/models/unit_test_helpers/dmt__expected_stg_customers_2.sql
{{
config(materialized='view')
}}
select 1 as customer_id, 'Michael' as first_name, 'P.' as last_name
union all
select 2 as customer_id, 'Shawn' as first_name, 'M.' as last_name |
<reponame>Rob--W/phabricator
ALTER TABLE {$NAMESPACE}_harbormaster.harbormaster_buildstep
ADD description LONGTEXT NOT NULL COLLATE utf8_bin;
|
<reponame>lct45/kafka-tutorials
CREATE STREAM TRANSACTION_STREAM (
id VARCHAR,
transaction STRUCT<num_shares INT,
amount DOUBLE,
txn_ts VARCHAR,
customer STRUCT<first_name VARCHAR,
... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 17, 2021 at 12:09 AM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... |
<gh_stars>1-10
create table shop_admin
(
adminid int auto_increment
primary key,
adminuser varchar(32) not null,
adminpasswd char(32) not null,
adminemail varchar(50) not null,
logintime int default '0' not null,
loginip bigint default '0' not null,
createtime int default '0' not null,
constraint shop_admin_a... |
<filename>src/test/resources/migration/V18__add_event_timestamp_index_on_statustabeller.sql<gh_stars>0
create index sykmeldingstatus_event_timestamp_idx on sykmeldingstatus (event_timestamp); |
select s.name
from salesperson s
left join orders o
on s.sales_id = o.sales_id
left join company c
on o.com_id = c.com_id
GROUP BY
name
HAVING
sum(if(c.name = 'RED', 1, 0)) = 0
ORDER BY
S.sales_id
来源:力扣(LeetCode)
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
-- solution 2
SELECT s.name
from... |
CREATE TABLE "users"
(
"id" serial,
"name" text NOT NULL,
PRIMARY KEY
("id")
) |
CREATE OR REPLACE FUNCTION mt_user_c_cf3(i_json json)
RETURNS json AS
$BODY$
err = ""
try
sql = "
insert into mabotech.user
(id, name, active, createdon, createdby, lastupdateon, lastupdatedby)
values(DEFAULT, '#{i_json.name}', 1, now(), '#{i_json.user}', now(), '#{i_json.user}')
returning id... |
DROP DATABASE IF EXISTS apicidb;
CREATE DATABASE IF NOT EXISTS apicidb;
USE apicidb;
CREATE TABLE clientes (
id int(11) NOT NULL AUTO_INCREMENT,
nombre varchar(100) NOT NULL,
email varchar(255) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
INSERT INTO `cliente... |
insert into application_properties(name, value) values ('application.loglevel','info'); |
Grant execute on [dbo].[usp_CreateAirline] to [IIS APPPOOL\TestIdentity]
Go
Grant execute on [dbo].[usp_CreateAirport] to [IIS APPPOOL\TestIdentity]
Go
Grant execute on [dbo].[usp_BookSeat] to [IIS APPPOOL\TestIdentity]
Go
Grant execute on [dbo].[usp_CreateFlight] to [IIS APPPOOL\TestIdentity]
Go
Grant execute on [... |
<gh_stars>0
--
-- <NAME>.
-- Prepared SQL queries for 'PipelineImpllinks' definition.
--
--
-- SELECT template for table `PipelineImpllinks`
--
SELECT `runs`, `self`, `queue`, `actions`, `_class` FROM `PipelineImpllinks` WHERE 1;
--
-- INSERT template for table `PipelineImpllinks`
--
INSERT INTO `PipelineImpllinks`(... |
SELECT table_name FROM user_tables; |
<filename>create-function-to-pass-multiple-value-parameter.sql
CREATE FUNCTION dbo.CSVToList (@CSV varchar(3000))
RETURNS @Result TABLE (Value varchar(30))
AS
BEGIN
DECLARE @List TABLE
(
Value varchar(30)
)
DECLARE
@Value varchar(30),
@Pos int
SET @CSV ... |
<reponame>aravind-alpha/Hackerrank-Solutions
SELECT Q2.submission_date, Q3.unique_count, Q2.hacker_id, H.name FROM
/**Using sliding window to take the top hacker based on the orders given in each sub group**/
(
SELECT submission_date, submission_count, hacker_id,
RANK() OVER (PARTITION BY submi... |
<reponame>sayedcsekuet/file-uploader
CREATE TABLE IF NOT EXISTS files
(
id VARCHAR(36) PRIMARY KEY,
name VARCHAR(255) NOT NULL,
meta_data JSON DEFAULT NULL,
owner_id VARCHAR(100) NOT NULL,
bucket_path VARCHAR(255) NOT NULL,
provider VARCHAR(20) NO... |
WITH source AS (
SELECT *
FROM {{ source('sheetload', 'planned_values') }}
), renamed AS (
SELECT
unique_key::NUMBER AS primary_key,
plan_month::DATE AS plan_month,
planned_new_pipe::NUMBER AS planned_new_pipe,
planned_... |
SELECT t1.id AS subjectId, t2.id as objectId
FROM lineage AS l1
JOIN tokens AS t1 ON t1.id = l1.id
JOIN tokens AS t2 ON t2.id = l1.pid
WHERE t1.token = $subject
AND t2.token LIKE $object
AND (
t1.lang = t2.lang OR
t1.lang IN ( 'eng', 'und' ) OR
t2.lang IN ( 'eng', 'und' )
)
-- AND t1.tag NOT IN ( 'colloquial'... |
-- This query pivots lab values taken in the patient's ICU stay
-- Have already confirmed that the unit of measurement is always the same: null or the correct unit
drop MATERIALIZED VIEW IF EXISTS labs_si CASCADE;
create MATERIALIZED VIEW labs_si as
select
pvt.icustay_id
, min(case when label = 'ANION GAP' then ... |
<filename>resources/migrations/20191105135718-email-outbox.down.sql<gh_stars>10-100
DROP TABLE email_outbox;
|
<reponame>inaba1231/appstack-5.6.25-0<filename>postgresql/share/contrib/postgis-2.1/extras/tiger_geocoder/tiger_2011/normalize/state_extract.sql
-- state_extract(addressStringLessZipCode)
-- Extracts the state from end of the given string.
--
-- This function uses the state_lookup table to determine which state
-- the ... |
<reponame>riceissa/aiwatch
insert into positions(person, organization, title, start_date, start_date_precision, end_date, end_date_precision, urls, notes, employment_type, cause_area) values
('<NAME>', 'Leverage Research', 'Executive Director', '2011-01-01', 'month', NULL, NULL, 'https://web.archive.org/web/2021... |
--
-- Nimrod/G
-- https://github.com/UQ-RCC/nimrodg
--
-- SPDX-License-Identifier: Apache-2.0
-- Copyright (c) 2021 The University of Queensland
--
-- 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 Licen... |
<filename>src/13_views/hemmerling_viewmovie_challenge_query1.sql
select M.mID, title, stars
from Movie M, Rating R
where M.mID = R.mID order by M.mID, stars;
|
CREATE TABLE transforms
(
block_hash BLOB NOT NULL,
--TransformEntry
data BLOB NOT NULL,
FOREIGN KEY (block_hash) REFERENCES block_metadata (block_hash)
);
CREATE INDEX idx_transforms_block_hash ON transforms (block_hash);
|
IF OBJECT_ID('finance.income_selector_view') IS NOT NULL
DROP VIEW finance.income_selector_view;
GO
CREATE VIEW finance.income_selector_view
AS
SELECT
finance.account_scrud_view.account_id AS income_id,
finance.account_scrud_view.account_name AS income_name
FROM finance.account_scrud_view
WHERE account_mast... |
BEGIN;
ALTER TABLE batch_specs ADD COLUMN IF NOT EXISTS no_cache BOOLEAN NOT NULL DEFAULT FALSE;
COMMIT;
|
<filename>query/iam/iam_support_center_access_group_configured.sql
select
-- Required Columns
id as resource,
case
when name ilike '%support%' then 'ok'
else 'skip'
end as status,
case
when name ilike '%support%' then name || ' specific to support center access group.'
else name || ' not speci... |
ALTER TABLE view_validator_block_commitments DROP COLUMN is_proposer;
|
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Мар 10 2019 г., 22:50
-- Версия сервера: 8.0.12
-- Версия PHP: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET ... |
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50710
Source Host : localhost
Source Database : weiqy
Target Server Type : MySQL
Target Server Version : 50710
File Encoding : utf-8
Date: 05/06/2016 10:31:03 ... |
create table FeedbackTemplate (
id nvarchar2(255) not null,
name nvarchar2(255),
description nvarchar2(4000),
department_id nvarchar2(255),
attachment_id nvarchar2(255),
CONSTRAINT "FEEDBACKTEMPLATE_PK" PRIMARY KEY ("ID")
);
create index feedbacktemplate_department on feedbacktemplate(departmen... |
<filename>Tables/dbo.FilmLocation.sql
CREATE TABLE [dbo].[FilmLocation]
(
[FilmLocationID] [int] NOT NULL,
[Country/State] [nchar] (30) COLLATE Latin1_General_CI_AS NOT NULL,
[Continent] [nchar] (20) COLLATE Latin1_General_CI_AS NOT NULL,
[Planet] [nchar] (10) COLLATE Latin1_General_CI_AS NULL
) ON [PRIMARY]
GO
ALTER T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.